Skip to content

Commit

Permalink
Gender 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 11, 2022
1 parent 225ba7c commit 298f02b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import gender from './index.js';
import test from 'ava';
import gender from './index.js';

test('gender return type to be string', t => {
t.is(typeof gender(), 'string');
t.is(typeof gender(), 'string');
});

test('gender with locale and extra return type to be string', t => {
t.is(typeof gender({locale: 'ru_RU', extra: ['gender']}), 'string');
t.is(typeof gender({locale: 'ru_RU', extra: ['gender']}), 'string');
});

test('gender with locale ru_RU includes', t => {
t.true(["Женский", "Мужской"].includes(gender({locale: 'ru_RU'})));
t.false(["foo", "bar"].includes(gender({locale: 'ru_RU'})));
});
t.true(['Женский', 'Мужской'].includes(gender({locale: 'ru_RU'})));
t.false(['foo', 'bar'].includes(gender({locale: 'ru_RU'})));
});

0 comments on commit 298f02b

Please sign in to comment.