1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Fix tests

This commit is contained in:
Robert Sandell 2018-12-30 10:10:33 +02:00
parent f338045df7
commit d9693088cc
3 changed files with 13 additions and 2 deletions

View File

@ -72,7 +72,7 @@ export default [
version
};
if (versionName) {
os.versionName = versionName;
os.versionName = versionName;
}
return os;
},

View File

@ -78,7 +78,8 @@ class Utils {
static getAndroidVersionName(version) {
const v = version.split('.').splice(0, 2).map(function(s) {
return parseInt(s) || 0;
}).push(0);
});
v.push(0);
if (v[0] == 1 && v[1] < 5) return undefined;
if (v[0] == 1 && v[1] < 6) return "Cupcake";
if (v[0] == 1 && v[1] >= 6) return "Donut";

View File

@ -1944,6 +1944,7 @@
os:
name: "Android"
version: "4.4.2"
versionName: "KitKat"
platform:
type: "tablet"
vendor: "Nexus"
@ -1959,6 +1960,7 @@
os:
name: "Android"
version: "4.3"
versionName: "Jelly Bean"
platform:
type: "mobile"
vendor: "Nexus"
@ -1974,6 +1976,7 @@
os:
name: "Android"
version: "4.2"
versionName: "Jelly Bean"
platform:
type: "tablet"
vendor: "Nexus"
@ -1989,6 +1992,7 @@
os:
name: "Android"
version: "3.2"
versionName: "Honeycomb"
platform:
type: "tablet"
engine:
@ -2003,6 +2007,7 @@
os:
name: "Android"
version: "2.3.4"
versionName: "Gingerbread"
platform:
type: "mobile"
engine:
@ -2017,6 +2022,7 @@
os:
name: "Android"
version: "1.6"
versionName: "Donut"
platform:
type: "mobile"
engine:
@ -2254,6 +2260,7 @@
os:
name: "Android"
version: "4.1.2"
versionName: "Jelly Bean"
platform:
type: "tablet"
engine:
@ -2445,6 +2452,7 @@
os:
name: "Android"
version: "5.0.2"
versionName: "Lollipop"
platform:
type: "mobile"
engine:
@ -2474,6 +2482,7 @@
os:
name: "Android"
version: "6.0"
versionName: "Marshmallow"
platform:
type: "mobile"
engine:
@ -2488,6 +2497,7 @@
os:
name: "Android"
version: "7.1.1"
versionName: "Nougat"
platform:
type: "tablet"
engine: