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

Fix integration tests

Provided more details for the testing thing
This commit is contained in:
Denis Demchenko 2017-10-17 21:55:45 +03:00
parent 058d5e0774
commit d3fec85440

View File

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