Skip to content

Commit 2d55a1a

Browse files
WoLfulusbukinoshita
authored andcommitted
CPF tests, version bump (#5)
1 parent 2f48785 commit 2d55a1a

File tree

3 files changed

+8713
-3
lines changed

3 files changed

+8713
-3
lines changed

__tests__/pessoa.js

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ test.beforeEach(() => {
99
leite = new Leite()
1010
})
1111

12+
test('cpf', t => {
13+
const expect = leite.pessoa.cpf()
14+
15+
t.is(typeof expect, 'string')
16+
t.regex(expect, /^\d{11}$/m)
17+
})
18+
19+
test('cpf formatado', t => {
20+
const expect = leite.pessoa.cpf({ formatado: true })
21+
22+
t.is(typeof expect, 'string')
23+
t.regex(expect, /^\d{3}.\d{3}.\d{3}-\d{2}$/m)
24+
})
25+
1226
test('email', t => {
1327
const expect = leite.pessoa.email()
1428
t.is(typeof expect, 'string')

0 commit comments

Comments
 (0)