mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-23 18:22:19 +01:00
fix: additional fixes after jest/recommanded introduction
This commit is contained in:
committed by
Peter Sanderson
parent
e4536e2186
commit
17f74166ca
@@ -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
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user