mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Continue writing
This commit is contained in:
7
test/unit/utils.js
Normal file
7
test/unit/utils.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import test from 'ava';
|
||||
import { getFirstMatch } from '../../src/utils';
|
||||
|
||||
test('getFirstMatch', t => {
|
||||
const matchedVersion = getFirstMatch(/version\/(\S+)/i, 'Chrome Version/11.11.11');
|
||||
t.is(matchedVersion, '11.11.11');
|
||||
});
|
||||
Reference in New Issue
Block a user