Skip to content
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

fix: additional fixes after jest/recommanded introduction #15273

Merged
merged 1 commit into from
Nov 6, 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
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,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 @@ -393,7 +394,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
Loading