-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path2d_array.test.js
More file actions
23 lines (17 loc) · 631 Bytes
/
2d_array.test.js
File metadata and controls
23 lines (17 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../../logger.js';
import { hourglassSum } from './2d_array.js';
import TEST_CASES from './2d_array.testcases_test.json';
describe('arrays: 2d Array hourglassSum', () => {
it('hourglassSum Test Cases', () => {
expect.assertions(4);
TEST_CASES.forEach((test) => {
const answer = hourglassSum(test.input);
console.debug(
`gethourGlass(${test.input.toString()}) solution found: ${answer}`
);
expect(answer).toStrictEqual(test.expected);
});
expect(TEST_CASES).toHaveLength(3);
});
});