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

Add parser.some function

This commit is contained in:
Matías Lescano
2018-07-17 17:43:54 -03:00
committed by Denis Demchenko
parent 2dc858e033
commit 0224f26bfc
2 changed files with 17 additions and 0 deletions

View File

@@ -114,3 +114,11 @@ test('Parser.is should pass', (t) => {
t.is(parser.is('desktop'), true);
t.is(parser.is('macos'), true);
});
test('Parser.some should pass', (t) => {
t.is(parser.some(['opera', 'chrome', 'firefox']), true);
t.is(parser.some(['macos', 'windows']), true);
t.is(parser.some(['chrome', 'firefox']), false);
t.is(parser.some([]), false);
t.is(parser.some(), false);
});