mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-10-01 01:37:43 +03:00
Merge branch 'master' into develop
This commit is contained in:
@@ -196,6 +196,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Fairphone 1U",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; FP1U Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Fairphone",
|
||||
"model": "FP1U",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "HTC Desire 820",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; HTC Desire 820 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36",
|
||||
|
@@ -46,6 +46,14 @@ describe('UAParser()', function () {
|
||||
assert.deepStrictEqual(UAParser(ua), new UAParser().setUA(ua).getResult());
|
||||
});
|
||||
|
||||
describe('UAParser() constructor does not throw with undefined ua argument', function () {
|
||||
assert.doesNotThrow(() => new UAParser(undefined).getResult());
|
||||
});
|
||||
|
||||
describe('UAParser.setUA method does not throw with undefined ua argument', function () {
|
||||
assert.doesNotThrow(() => new UAParser().setUA(undefined).getResult());
|
||||
});
|
||||
|
||||
for (var i in methods) {
|
||||
describe(methods[i]['title'], function () {
|
||||
for (var j in methods[i]['list']) {
|
||||
|
Reference in New Issue
Block a user