Add archive snippet tests
This commit is contained in:
@ -4,3 +4,15 @@ const {howManyTimes} = require('./_30s.js');
|
||||
test('howManyTimes is a Function', () => {
|
||||
expect(howManyTimes).toBeInstanceOf(Function);
|
||||
});
|
||||
test('howManyTimes returns the correct result', () => {
|
||||
expect(howManyTimes(100, 2)).toBe(2);
|
||||
});
|
||||
test('howManyTimes returns the correct result', () => {
|
||||
expect(howManyTimes(100, 2.5)).toBe(2);
|
||||
});
|
||||
test('howManyTimes returns the correct result', () => {
|
||||
expect(howManyTimes(100, 0)).toBe(0);
|
||||
});
|
||||
test('howManyTimes returns the correct result', () => {
|
||||
expect(howManyTimes(100, -1)).toBe(Infinity);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user