1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00
lancedikson_bowser/test/unit/utils.js

8 lines
229 B
JavaScript
Raw Normal View History

2017-04-09 14:13:00 +00:00
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');
});