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

Use built for CI

closes #252
This commit is contained in:
Denis Demchenko 2018-09-15 14:31:39 +03:00
parent 33146299dc
commit c0cfe887a9
2 changed files with 4 additions and 0 deletions

View File

@ -4,4 +4,5 @@ node_js:
- "8.4.0"
script:
- npm run lint
- npm build
- npm test

View File

@ -2,6 +2,7 @@ import test from 'ava';
import yaml from 'yamljs';
import path from 'path';
import Bowser from '../../src/bowser';
import BowserBuild from '../../es5';
const listOfUA = yaml.load(path.join(__dirname, 'useragentstrings.yml'));
@ -11,7 +12,9 @@ browserNames.forEach((browserName) => {
listOfUA[browserName].forEach((browser) => {
test('Check all the test browsers', (t) => {
const parsed = Bowser.parse(browser.ua);
const parsedBuild = BowserBuild.parse(browser.ua);
t.deepEqual(parsed, browser.spec, `${browser.ua}`);
t.deepEqual(parsedBuild, browser.spec, `${browser.ua}`);
t.is(parsed.browser.name, browserName, `${browser.ua}`);
});
});