1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Replace the main bowser file

This commit is contained in:
Denis Demchenko
2018-06-27 22:52:43 +03:00
parent 898d8e32dd
commit 6f3b13f9fd
3 changed files with 41 additions and 642 deletions

View File

@@ -1,13 +1,13 @@
import test from 'ava';
import yaml from 'yamljs';
import path from 'path';
import Bowser from '../../src/new-bowser';
import Bowser from '../../src/bowser';
const listOfUA = yaml.load(path.join(__dirname, 'useragentstrings.yml'));
for (const browserName in listOfUA) {
listOfUA[browserName].forEach((browser) => {
test('Check all the test browsers', t => {
test('Check all the test browsers', (t) => {
const parsed = new Bowser(browser.ua).parse().getResult();
t.deepEqual(parsed, browser.spec, `${browser.ua}`);
t.is(parsed.browser.name, browserName, `${browser.ua}`);