Skip to content

Commit

Permalink
fix: additional fixes after jest/recommanded introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-sanderson committed Nov 6, 2024
1 parent 5d1104b commit b168c2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ module.exports = {

// Jest plugin config
'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives
"jest/valid-describe-callback": "off", // This rule does not use Typescript and produces false positives
'jest/no-disabled-tests': 'off', // we still have a lot of skipped tests (WIP)
'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice
'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked
Expand Down Expand Up @@ -392,7 +393,7 @@ module.exports = {
{
files: ['packages/connect/e2e/**/*'],
rules: {
'jest/no-jasmine-globals': 'off', // Kamma tests
'jest/no-jasmine-globals': 'off', // Karma tests
},
},
],
Expand Down
5 changes: 5 additions & 0 deletions packages/utils/tests/getWeakRandomInt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ describe(getWeakRandomInt.name, () => {
});

it('returns same value when range is trivial', () => {
expect(getWeakRandomInt(0, 1)).toEqual(0);
expect(getWeakRandomInt(100, 101)).toEqual(100);
});

it('returns value in the given range', () => {
for (let i = 0; i < 10_000; i++) {
const result = getWeakRandomInt(0, 100);

Expand Down

0 comments on commit b168c2d

Please sign in to comment.