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

Fix tests after changes

This commit is contained in:
Denis Demchenko
2018-07-05 22:58:14 +03:00
parent 1f572ed8f4
commit c79b71736e
4 changed files with 5 additions and 4 deletions

View File

@@ -3,14 +3,14 @@ import Bowser from '../../src/bowser';
import Parser from '../../src/parser';
const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 OPR/43.0.2442.1165';
const browser = new Bowser(UA);
const browser = Bowser.getParser(UA);
test('Bowser`s constructor returns a Parser instance', (t) => {
t.truthy(browser instanceof Parser);
});
test('Bowser`s constructor fails if UA is empty', (t) => {
t.throws(() => (new Bowser()));
t.throws(() => (Bowser.getParser()));
});
test('Bowser.parse parses UA and returns result', (t) => {