Skip to content

Commit 5c53dbb

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] new eslint rules fixed.
1 parent f0bab44 commit 5c53dbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+203
-52
lines changed

src/hackerrank/interview_preparation_kit/arrays/2d_array.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import TEST_CASES from './2d_array.testcases_test.json';
66

77
describe('arrays: 2d Array hourglassSum', () => {
88
it('hourglassSum Test Cases', () => {
9-
expect.assertions(3);
9+
expect.assertions(4);
1010

1111
TEST_CASES.forEach((test) => {
1212
const answer = hourglassSum(test.input);
@@ -17,5 +17,7 @@ describe('arrays: 2d Array hourglassSum', () => {
1717

1818
expect(answer).toStrictEqual(test.expected);
1919
});
20+
21+
expect(TEST_CASES).toHaveLength(3);
2022
});
2123
});

src/hackerrank/interview_preparation_kit/arrays/cruch_bruteforce.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { arrayManipulation } from './cruch_bruteforce.js';
77

88
describe('arrays: crush (bruteforce) small cases', () => {
99
it('arrayManipulation Test Cases', () => {
10-
expect.assertions(3);
10+
expect.assertions(4);
1111

1212
TEST_CASES.forEach((test) => {
1313
const answer = arrayManipulation(test.n, test.queries);
@@ -18,5 +18,7 @@ describe('arrays: crush (bruteforce) small cases', () => {
1818

1919
expect(answer).toStrictEqual(test.expected);
2020
});
21+
22+
expect(TEST_CASES).toHaveLength(3);
2123
});
2224
});

src/hackerrank/interview_preparation_kit/arrays/cruch_optimized.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { arrayManipulation } from './cruch_optimized.js';
77

88
describe('arrays: crush (optimized)', () => {
99
it('arrayManipulation Test Cases', () => {
10-
expect.assertions(3);
10+
expect.assertions(4);
1111

1212
TEST_CASES.forEach((test) => {
1313
const answer = arrayManipulation(test.n, test.queries);
@@ -18,5 +18,7 @@ describe('arrays: crush (optimized)', () => {
1818

1919
expect(answer).toStrictEqual(test.expected);
2020
});
21+
22+
expect(TEST_CASES).toHaveLength(3);
2123
});
2224
});

src/hackerrank/interview_preparation_kit/arrays/ctci_array_left_rotation.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ROT_LEFT_TEST_CASES from './ctci_array_left_rotation.testcases.json';
77

88
describe('ctci_array_left_rotation', () => {
99
it('rotLeft Test cases', () => {
10-
expect.assertions(8);
10+
expect.assertions(9);
1111

1212
ROT_LEFT_TEST_CASES.forEach((test) => {
1313
const answer = rotLeft(test.input, test.d_rotations);
@@ -16,5 +16,7 @@ describe('ctci_array_left_rotation', () => {
1616

1717
expect(answer).toStrictEqual(test.expected);
1818
});
19+
20+
expect(ROT_LEFT_TEST_CASES).toHaveLength(8);
1921
});
2022
});

src/hackerrank/interview_preparation_kit/arrays/minimum_swaps_2.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import TEST_CASES from './minimum_swaps_2.testcases.json';
77

88
describe('minimum swaps 2', () => {
99
it('minimumSwaps', () => {
10-
expect.assertions(3);
10+
expect.assertions(4);
1111

1212
TEST_CASES.forEach((test) => {
1313
const answer = minimumSwaps(test.input);
@@ -16,5 +16,7 @@ describe('minimum swaps 2', () => {
1616

1717
expect(answer).toStrictEqual(test.expected);
1818
});
19+
20+
expect(TEST_CASES).toHaveLength(3);
1921
});
2022
});

src/hackerrank/interview_preparation_kit/arrays/new_year_chaos.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import TEST_CASES from './new_year_chaos.testcases.json';
77

88
describe('new_year_chaos', () => {
99
it('minimumBribes Test Cases', () => {
10-
expect.assertions(5);
10+
expect.assertions(6);
1111

1212
TEST_CASES.forEach((test) => {
1313
const answer = minimumBribesText(test.input);
@@ -19,5 +19,7 @@ describe('new_year_chaos', () => {
1919

2020
expect(answer).toStrictEqual(test.expected);
2121
});
22+
23+
expect(TEST_CASES).toHaveLength(5);
2224
});
2325
});

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/count_triplets_1_bruteforce.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import SMALL_TEST_CASES from './count_triplets_1.small.testcases.json';
77

88
describe('count_triplets_1', () => {
99
it('countTriplets test cases', () => {
10-
expect.assertions(4);
10+
expect.assertions(5);
1111

1212
SMALL_TEST_CASES.forEach((test) => {
1313
const answer = countTriplets(test.input, test.r);
@@ -18,5 +18,7 @@ describe('count_triplets_1', () => {
1818

1919
expect(answer).toStrictEqual(test.expected);
2020
});
21+
22+
expect(SMALL_TEST_CASES).toHaveLength(4);
2123
});
2224
});

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/count_triplets_1_optimized.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import BIG_TEST_CASES from './count_triplets_1.big.testcases.json';
77

88
describe('count_triplets_1 (optimized)', () => {
99
it('countTriplets small test cases', () => {
10-
expect.assertions(4);
10+
expect.assertions(5);
1111

1212
SMALL_TEST_CASES.forEach((test) => {
1313
const answer = countTriplets(test.input, test.r);
@@ -18,10 +18,12 @@ describe('count_triplets_1 (optimized)', () => {
1818

1919
expect(answer).toStrictEqual(test.expected);
2020
});
21+
22+
expect(SMALL_TEST_CASES).toHaveLength(4);
2123
});
2224

2325
it('countTriplets big test cases', () => {
24-
expect.assertions(1);
26+
expect.assertions(2);
2527

2628
BIG_TEST_CASES.forEach((test) => {
2729
const answer = countTriplets(test.input, test.r);
@@ -32,5 +34,7 @@ describe('count_triplets_1 (optimized)', () => {
3234

3335
expect(answer).toStrictEqual(test.expected);
3436
});
37+
38+
expect(BIG_TEST_CASES).toHaveLength(1);
3539
});
3640
});

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/ctci-ransom-note.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import TEST_CASES from './ctci-ransom-note.testcases.json';
66

77
describe('ctci_ransom_note', () => {
88
it('checkMagazine test cases', () => {
9-
expect.assertions(3);
9+
expect.assertions(4);
1010

1111
TEST_CASES.forEach((value) => {
1212
const answer = checkMagazineText(value.magazine, value.note);
@@ -18,5 +18,7 @@ describe('ctci_ransom_note', () => {
1818

1919
expect(answer).toStrictEqual(value.expected);
2020
});
21+
22+
expect(TEST_CASES).toHaveLength(3);
2123
});
2224
});

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/frequency_queries_bruteforce.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import SMALL_TEST_CASES from './frequency_queries_testcases.json';
66

77
describe('frequency_queries', () => {
88
it('freqQuery test cases', () => {
9-
expect.assertions(4);
9+
expect.assertions(5);
1010

1111
SMALL_TEST_CASES.forEach((value) => {
1212
const answer = freqQuery(value.input);
@@ -15,6 +15,8 @@ describe('frequency_queries', () => {
1515

1616
expect(answer).toStrictEqual(value.expected);
1717
});
18+
19+
expect(SMALL_TEST_CASES).toHaveLength(4);
1820
});
1921

2022
it('freqQuery border case', () => {

0 commit comments

Comments
 (0)