Test cleanup and fixes [c-d]

This commit is contained in:
Angelos Chalaris
2018-06-18 16:34:04 +03:00
parent d29974ebc9
commit 105185c213
136 changed files with 805 additions and 484 deletions

View File

@ -5,7 +5,13 @@ 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");
test('validates identification number', () => {
expect(luhnCheck(6011329933655299)).toBe(false)
});
test('validates identification number', () => {
expect(luhnCheck('4485275742308327')).toBe(true)
});
test('validates identification number', () => {
expect(luhnCheck(123456789)).toBe(false)
});