Skip to content

Commit

Permalink
test for validate dnicWithDateValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavochavarria committed Sep 28, 2019
1 parent cc67612 commit 62b2919
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions __tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'ava';

import dnic from '../src';
import dnic, {dnicWithDateValidation} from '../src';

const VALID_DNI = '001-280592-0025N';
const INVALID_DATE = '001-310292-0000N';
Expand All @@ -10,6 +10,6 @@ test('shoud pass a valid dni', t => {
});

test('validate date', t => {
t.true(VALID_DNI);
t.true(INVALID_DATE);
t.true(dnicWithDateValidation(VALID_DNI));
t.false(dnicWithDateValidation(INVALID_DATE));
});

0 comments on commit 62b2919

Please sign in to comment.