Files
typescript-katas/5kyu/a-chain-adding-function/tests.ts
2025-02-01 22:56:58 +01:00

14 lines
340 B
TypeScript

import add from './solution';
import {assert} from "chai";
describe('solution', () => {
it('should work when called once', () => {
assert(add(1) == 1);
});
it('should work when called twice', () => {
assert(add(1)(2) == 3);
});
it('should work when called 5 times', () => {
assert(add(1)(2)(3)(4)(5) == 15);
});
});