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

Add support for using short version for browser name in satisfies

This commit is contained in:
Will Soares
2019-02-17 22:05:40 -03:00
parent 28bff841b3
commit a307533f74
6 changed files with 106 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
import test from 'ava';
import {
getBrowserAlias,
getFirstMatch,
getWindowsVersionName,
compareVersions,
@@ -50,3 +51,8 @@ test('compareVersions', (t) => {
t.is(compareVersions(versionA, versionB, isLoose), result, `version ${versionA} should be ${matching} version ${versionB}`);
});
});
test('getBrowserAlias', (t) => {
t.is(getBrowserAlias('Microsoft Edge'), 'edge');
t.is(getBrowserAlias('Unexisting Browser'), void 0);
});