Merge branch 'master' into develop

This commit is contained in:
Faisal Salman
2021-04-05 13:24:46 +07:00
9 changed files with 31 additions and 12 deletions

View File

@@ -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",

View File

@@ -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']) {