Files
30-seconds-of-code/test/isArmstrongNumber.test.js
2018-10-26 21:08:37 +03:00

13 lines
387 B
JavaScript

const expect = require('expect');
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();
});