SB-6.1-PRE

This commit is contained in:
ItzEmerald committed 2021-02-02 13:50:53 +00:00
1 parent 690169a409
commit 358a25f522
3760 files changed
+300059 -36

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import test from 'ava'
import Chance from '../chance.js'
import _ from 'lodash'
const chance = new Chance()
test('cnpj() returns a random valid taxpayer number for Brazil companies (CNPJ)', t => {
_.times(1000, () => {
let cnpj = chance.cnpj()
t.true(_.isString(cnpj))
t.true(/^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/m.test(cnpj))
t.is(cnpj.length, 18)
})
})