Files
30-seconds-of-code/test/luhnCheck/luhnCheck.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

12 lines
416 B
JavaScript

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");