Skip to content

Commit ad37314

Browse files
committed
feat(pascal): copy over tests from solution
1 parent d64601a commit ad37314

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

19_pascal/pascal.spec.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
const pascal = require('./pascal');
22

33
describe('pascal', () => {
4-
test('First test description', () => {
5-
// Replace this comment with any other necessary code, and update the expect line as necessary
4+
test('Gets the first row of pascal', () => {
5+
expect(pascal(1)).toEqual([1]);
6+
});
7+
8+
test.skip('Gets the second row of pascal', () => {
9+
expect(pascal(2)).toEqual([1, 1]);
10+
});
11+
12+
test.skip('Gets the third row of pascal', () => {
13+
expect(pascal(3)).toEqual([1, 2, 1]);
14+
});
15+
16+
test.skip('Gets the fourth row of pascal', () => {
17+
expect(pascal(4)).toEqual([1, 3, 3, 1]);
18+
});
19+
20+
test.skip('Gets the fifth row of pascal', () => {
21+
expect(pascal(5)).toEqual([1, 4, 6, 4, 1]);
22+
});
623

7-
expect(pascal()).toBe('');
24+
test.skip('Gets the sixth row of pascal', () => {
25+
expect(pascal(6)).toEqual([1, 5, 10, 10, 5, 1]);
826
});
9-
10-
test.skip('Second test description', () => {
11-
// Replace this comment with any other necessary code, and update the expect line as necessary
1227

13-
expect(pascal()).toBe('');
28+
test.skip('Gets the seventh row of pascal', () => {
29+
expect(pascal(7)).toEqual([1, 6, 15, 20, 15, 6, 1]);
1430
});
1531
});

0 commit comments

Comments
 (0)