Add tests for some archive snippets

This commit is contained in:
Angelos Chalaris
2018-10-26 21:08:37 +03:00
parent 7df4d2e67f
commit 1cc4f5bdd5
3 changed files with 18 additions and 0 deletions

View File

@ -4,3 +4,9 @@ const {isArmstrongNumber} = require('./_30s.js');
test('isArmstrongNumber is a Function', () => {
expect(isArmstrongNumber).toBeInstanceOf(Function);
});
test('isArmstrongNumber returns true', () => {
expect(isArmstrongNumber(1634)).toBeTruthy();
});
test('isArmstrongNumber returns false', () => {
expect(isArmstrongNumber(56)).toBeFalsy();
});