Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
11
test/luhnCheck/luhnCheck.test.js
Normal file
11
test/luhnCheck/luhnCheck.test.js
Normal file
@ -0,0 +1,11 @@
|
||||
const expect = require('expect');
|
||||
const luhnCheck = require('./luhnCheck.js');
|
||||
|
||||
|
||||
test('luhnCheck is a Function', () => {
|
||||
expect(luhnCheck).toBeInstanceOf(Function);
|
||||
});
|
||||
t.equal(luhnCheck(6011329933655299), false, "validates identification number");
|
||||
t.equal(luhnCheck('4485275742308327'), true, "validates identification number");
|
||||
t.equal(luhnCheck(123456789), false, "validates identification number");
|
||||
|
||||
Reference in New Issue
Block a user