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:
File diff suppressed because it is too large
Load Diff
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user