8000 Update AllCombinationsOfSizeK.test.js · imrahulkb/JavaScript@de46071 · GitHub
[go: up one dir, main page]

Skip to content

Commit de46071

Browse files
authored
Update AllCombinationsOfSizeK.test.js
Changes made it the type of testing. Instead of testing the class now the program will test the function
1 parent f4d6fed commit de46071

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Backtracking/tests/AllCombinationsOfSizeK.test.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
import { Combinations } from '../AllCombinationsOfSizeK'
1+
import { generateCombinations } from '../AllCombinationsOfSizeK'
22

33
describe('AllCombinationsOfSizeK', () => {
44
it('should return 3x2 matrix solution for n = 3 and k = 2', () => {
5-
const test1 = new Combinations(3, 2)
6-
expect(test1.findCombinations()).toEqual([
5+
expect(generateCombinations(3,2)).toEqual([
76
[1, 2],
87
[1, 3],
98
[2, 3]
109
])
1110
})
1211

1312
it('should return 6x2 matrix solution for n = 4 and k = 2', () => {
14-
const test2 = new Combinations(4, 2)
15-
expect(test2.findCombinations()).toEqual([
13+
expect(generateCombinations(4,2)).toEqual([
1614
[1, 2],
1715
[1, 3],
1816
[1, 4],

0 commit comments

Comments
 (0)
0