mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-30 01:14:25 +03:00
Merge branch 'develop' of github.com:faisalman/ua-parser-js into develop
This commit is contained in:
@@ -968,5 +968,15 @@
|
||||
"version" : "6.5.8.2910",
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GSA on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) GSA/30.1.161623614 Mobile/14F89 Safari/602.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GSA",
|
||||
"version" : "30.1.161623614",
|
||||
"major" : "30"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
File diff suppressed because it is too large
Load Diff
15
test/test.js
15
test/test.js
@@ -65,6 +65,21 @@ for (var i in methods) {
|
||||
});
|
||||
}
|
||||
|
||||
describe('Returns', function () {
|
||||
it('getResult() should returns JSON', function(done) {
|
||||
assert.deepEqual(new UAParser('').getResult(),
|
||||
{
|
||||
ua : '',
|
||||
browser: { name: undefined, version: undefined, major: undefined },
|
||||
cpu: { architecture: undefined },
|
||||
device: { vendor: undefined, model: undefined, type: undefined },
|
||||
engine: { name: undefined, version: undefined},
|
||||
os: { name: undefined, version: undefined }
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Extending Regex', function () {
|
||||
var uaString = 'Mozilla/5.0 MyOwnBrowser/1.3';
|
||||
var myOwnBrowser = [[/(myownbrowser)\/((\d+)?[\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, UAParser.BROWSER.MAJOR]];
|
||||
|
Reference in New Issue
Block a user