diff --git a/.eslintrc.js b/.eslintrc.js index e160df3fab4..9ad3e46ee5a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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 @@ -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 }, }, ], diff --git a/packages/utils/tests/getWeakRandomInt.test.ts b/packages/utils/tests/getWeakRandomInt.test.ts index ce363c9e9de..f596b9c598b 100644 --- a/packages/utils/tests/getWeakRandomInt.test.ts +++ b/packages/utils/tests/getWeakRandomInt.test.ts @@ -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);