Updated the test system
This commit is contained in:
15
test/luhnCheck.test.js
Normal file
15
test/luhnCheck.test.js
Normal file
@ -0,0 +1,15 @@
|
||||
const expect = require('expect');
|
||||
const {luhnCheck} = require('./_30s.js');
|
||||
|
||||
test('luhnCheck is a Function', () => {
|
||||
expect(luhnCheck).toBeInstanceOf(Function);
|
||||
});
|
||||
test('validates identification number', () => {
|
||||
expect(luhnCheck(6011329933655299)).toBeFalsy();
|
||||
});
|
||||
test('validates identification number', () => {
|
||||
expect(luhnCheck('4485275742308327')).toBeTruthy();
|
||||
});
|
||||
test('validates identification number', () => {
|
||||
expect(luhnCheck(123456789)).toBeFalsy();
|
||||
});
|
||||
Reference in New Issue
Block a user