mirror of
https://github.com/lancedikson/bowser
synced 2026-09-23 04:24:54 +00:00
chore: Install tsdown and create a dual package for UMD and ESM
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import test from 'ava';
|
||||
import yaml from 'yamljs';
|
||||
import path from 'path';
|
||||
import Bowser from '../../src/bowser';
|
||||
import BowserBuild from '../../es5';
|
||||
import Bowser from '../../dist/esm/bowser.mjs';
|
||||
|
||||
const listOfUA = yaml.load(path.join(__dirname, 'useragentstrings.yml'));
|
||||
|
||||
@@ -12,7 +11,7 @@ browserNames.forEach((browserName) => {
|
||||
listOfUA[browserName].forEach((browser, index) => {
|
||||
test(`Test ${browserName} ${index}`, (t) => {
|
||||
const parsed = Bowser.parse(browser.ua);
|
||||
const parsedBuild = BowserBuild.parse(browser.ua);
|
||||
const parsedBuild = Bowser.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}`);
|
||||
|
||||
Reference in New Issue
Block a user