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

Use snake case for alias names

This commit is contained in:
Will Soares
2019-02-25 23:23:55 -03:00
parent a307533f74
commit 064aa812fc
3 changed files with 34 additions and 12 deletions

15
test/unit/constants.js Normal file
View File

@@ -0,0 +1,15 @@
import test from 'ava';
import { BROWSER_ALIASES_MAP } from '../../src/constants';
test('check duplicate aliases', (t) => {
const aliasesList = Object.keys(BROWSER_ALIASES_MAP).map(value => (BROWSER_ALIASES_MAP[value]));
let foundOnce, foundTwice;
const duplicates = aliasesList.filter(item => {
foundOnce = aliasesList.indexOf(item);
foundTwice = aliasesList.indexOf(item, foundOnce + 1);
return +foundTwice !== -1;
});
t.deepEqual(duplicates, []);
});