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

8 lines
229 B
JavaScript

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');
});