1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Change browser names to lowercase to fix case-sensitivity issues

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-18 19:54:03 +00:00
parent 87cdc11519
commit bc0f1ea8d4
7 changed files with 298 additions and 296 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -28,13 +28,13 @@ test('Parser.parseBrowser is being called when the Parser.getBrowser() is called
const spy = sinon.spy(parser, 'parseBrowser');
const b = parser.getBrowser();
t.truthy(spy.called);
t.is(b.name, 'Opera');
t.is(b.name, 'opera');
t.is(b.version, '43.0.2442.1165');
parser.parseBrowser.restore();
});
test('Parser.getBrowserName returns a correct result', (t) => {
t.is(parser.getBrowserName(), 'Opera');
t.is(parser.getBrowserName(), 'opera');
});
test('Parser.getBrowserVersion returns a correct result', (t) => {
@@ -220,8 +220,8 @@ test('Parser.isBrowser should pass when loosely checking', (t) => {
});
test('Parser.isBrowser should pass for non-aliased browsers', (t) => {
t.is(focusParser.isBrowser('Focus', true), true);
t.is(focusParser.isBrowser('Focus', false), true);
t.is(focusParser.isBrowser('focus', true), true);
t.is(focusParser.isBrowser('focus', false), true);
});
test('Parser.isEngine should pass', (t) => {

View File

@@ -129,8 +129,8 @@ test('assign', (t) => {
});
test('getBrowserAlias', (t) => {
t.is(getBrowserAlias('Microsoft Edge'), 'edge');
t.is(getBrowserAlias('Unexisting Browser'), void 0);
t.is(getBrowserAlias('microsoft edge'), 'edge');
t.is(getBrowserAlias('unexisting browser'), void 0);
});
test('getBrowserTypeByAlias', (t) => {