Skip to content

Update dependency eslint-plugin-jest to v28.8.0 #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/hackerrank/implementation/betweenTwoSets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,27 @@ describe('betweenTwoSets', () => {

const calculatedA = getTotalX([], input);
console.log(`Between Two Sets getTotalX([], ${input}): ${calculatedA}`);

expect(calculatedA).toBe(solutionFound);

const calculatedB = getTotalX(input, []);
console.log(`Between Two Sets getTotalX(${input}, []): ${calculatedB}`);

expect(calculatedB).toBe(solutionFound);

const calculatedC = getTotalX([], []);
console.log(`Between Two Sets getTotalX([], []): ${calculatedC}`);

expect(calculatedC).toBe(solutionFound);

const calculatedD = isFactor(1, []);
console.log(`Between Two Sets isFactor(1, []): ${calculatedD}`);

expect(calculatedD).toBe(false);

const calculatedE = factorOf(1, []);
console.log(`Between Two Sets factorOf(1, []): ${calculatedE}`);

expect(calculatedE).toBe(false);
});

Expand Down
4 changes: 4 additions & 0 deletions src/hackerrank/implementation/kangaroo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('number Line Jumps', () => {
console.log(
`number Line Jumps(${x1}, ${v1}, ${x2}, ${v2}) Border case: ${calculated}`
);

expect(calculated).toBe(solutionFound);
});

Expand All @@ -35,6 +36,7 @@ describe('number Line Jumps', () => {
console.log(
`number Line Jumps(${x1}, ${v1}, ${x2}, ${v2}) Border case: ${calculated}`
);

expect(calculated).toBe(solutionFound);
});

Expand All @@ -52,6 +54,7 @@ describe('number Line Jumps', () => {
console.log(
`number Line Jumps(${x1}, ${v1}, ${x2}, ${v2}) Test case 0: ${calculated}`
);

expect(calculated).toBe(solutionFound);
});

Expand All @@ -69,6 +72,7 @@ describe('number Line Jumps', () => {
console.log(
`number Line Jumps(${x1}, ${v1}, ${x2}, ${v2}) Test case 1: ${calculated}`
);

expect(calculated).toBe(solutionFound);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const TEST_CASES = [
expected: 'Yes'
}
];

describe('ctci_ransom_note', () => {
it('checkMagazine test cases', () => {
expect.assertions(3);
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/projecteuler/euler001.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('euler001', () => {
console.log(
`euler001(${test.a}, ${test.b}, ${test.n}) solution found: ${test.answer}`
);

expect(calculated).toStrictEqual(test.answer);
});
});
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/birthdayCakeCandles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('birthdayCakeCandles', () => {
console.log(
`birthdayCakeCandles(${test.input}) Test case 0: ${calculated}`
);

expect(calculated).toBe(test.answer);
}
});
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/simpleArraySum.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { logger as console } from '../../logger';
import { simpleArraySum } from './simpleArraySum';

import { describe, expect, it } from '@jest/globals';

describe('problem simpleArraySum', () => {
it('problem simpleArraySum Test case 0', () => {
expect.assertions(1);
Expand Down
2 changes: 2 additions & 0 deletions src/hackerrank/warmup/timeConversion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { logger as console } from '../../logger';
import { timeConversion } from './timeConversion';

import { describe, expect, it } from '@jest/globals';

describe('timeConversion', () => {
it('timeConversion example', () => {
expect.assertions(2);
Expand All @@ -15,6 +16,7 @@ describe('timeConversion', () => {
for (const test of tests) {
const calculated = timeConversion(test.input);
console.log(`timeConversion(${test.input}) Test case 0: ${calculated}`);

expect(calculated).toBe(test.answer);
}
});
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0005.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { logger as console } from '../logger';
import { problem0005Simple } from './problem0005-simple';

import { describe, expect, it } from '@jest/globals';

describe('problem 0005 simple', () => {
it('problem 0005 simple solution found by BRUTE FORCE FULL', async () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0007.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { logger as console } from '../logger';
import { problem0007 } from './problem0007';

import { describe, expect, it } from '@jest/globals';

describe('problem 0007 BRUTEFORCE', () => {
it('problem 0007 BRUTEFORCE large', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0008.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { logger as console } from '../logger';
import { problem0008 } from './problem0008';

import { describe, expect, it } from '@jest/globals';

describe('problem 0008', () => {
it('problem 0008 solution found', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0010.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { logger as console } from '../logger';
import { problem0010 } from './problem0010';

import { describe, expect, it } from '@jest/globals';

describe('problem 0010', () => {
it('problem 0010 solution found BRUTE FORCE', () => {
expect.assertions(1);
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/problem0016.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ describe('problem 0016', () => {

calculated = problem0016(base, exponent);
console.log(`PROBLEM 0016 solution found: ${calculated}`);

expect(calculated).toBe(solutionFound);

calculated = problem0016alt(base, exponent);
console.log(`PROBLEM 0016 alternative solution found: ${calculated}`);

expect(calculated).toBe(solutionFound);
});
});