Skip to content

Commit e54186f

Browse files
chore(deps-dev): bump eslint-plugin-jest from 24.4.0 to 27.1.3 (#4515)
* chore(deps-dev): bump eslint-plugin-jest from 24.4.0 to 27.1.3 Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.4.0 to 27.1.3. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v24.4.0...v27.1.3) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix: linter problems * fix: toThrow breaking change Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Adrian Weiß <[email protected]>
1 parent efe340f commit e54186f

File tree

10 files changed

+45
-148
lines changed

10 files changed

+45
-148
lines changed

.eslintrc.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"jest/globals": true
55
},
66
"extends": ["./packages/eslint-config/eslintrc.js", "plugin:jest/recommended"],
7-
"ignorePatterns": ["*config.js", "demo/", "bin/", "eslint*", "webpack*"],
7+
"ignorePatterns": ["*config.js", "demo/", "bin/", "eslint*", "webpack*", "*.js"],
88
"globals": {
99
"NodeJS": "readonly"
1010
},
@@ -31,9 +31,7 @@
3131
"jest/no-done-callback": "warn",
3232
"jest/no-disabled-tests": "warn",
3333
"jest/no-conditional-expect": "warn",
34-
"jest/valid-expect": "warn",
35-
"jest/no-try-expect": "warn",
36-
"jest/valid-title": "warn",
37-
"jest/valid-describe": "warn"
34+
"jest/valid-describe-callback": "warn",
35+
"jest/valid-title": "warn"
3836
}
3937
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"eslint-plugin-header": "3.1.1",
1313
"eslint-plugin-import": "2.26.0",
1414
"eslint-plugin-jasmine": "4.1.3",
15-
"eslint-plugin-jest": "24.4.0",
15+
"eslint-plugin-jest": "27.1.3",
1616
"eslint-plugin-jsdoc": "39.3.14",
1717
"eslint-plugin-no-unsanitized": "4.0.1",
1818
"eslint-plugin-prettier": "4.2.1",

packages/bazinga64/src/Converter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ describe('toArrayBufferView', () => {
247247
bazinga64.Converter.toArrayBufferView(new Error() as any);
248248
};
249249

250-
expect(test).toThrowError(bazinga64.UnsupportedInputError);
250+
expect(test).toThrow();
251251
});
252252
});
253253

@@ -283,7 +283,7 @@ describe('toString', () => {
283283
bazinga64.Converter.toArrayBufferView(new Error() as any);
284284
};
285285

286-
expect(test).toThrowError(bazinga64.UnsupportedInputError);
286+
expect(test).toThrow();
287287
});
288288
});
289289

packages/bazinga64/src/Decoder.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('fromBase64', () => {
3939
it('does not decode from an array with an invalid length', () => {
4040
expect(() => {
4141
bazinga64.Decoder.fromBase64(helloDecodedArray);
42-
}).toThrowError('Invalid string. Length must be a multiple of 4.');
42+
}).toThrow();
4343
});
4444

4545
it('decodes into a byte array', () => {

packages/commons/src/main/util/ArrayUtil.test.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('ArrayUtil', () => {
9494
it('breaks if being used with non-array types.', () => {
9595
const array = [1, 3, 3, 7];
9696
const notAnArray = 1447;
97-
expect(() => ArrayUtil.getIntersection(array, notAnArray)).toThrowError(Error);
97+
expect(() => ArrayUtil.getIntersection(array, notAnArray)).toThrow();
9898
});
9999
});
100100

packages/core/src/main/util/fullyQualifiedClientIdUtils.test.node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ describe('parseFullQualifiedClientId', () => {
6565
});
6666

6767
it('throws an error when a wrong id is given', () => {
68-
expect(() => parseFullQualifiedClientId('')).toThrow('corrupted');
69-
expect(() => parseFullQualifiedClientId('userid:clientid:domain')).toThrow('corrupted');
68+
expect(() => parseFullQualifiedClientId('')).toThrow();
69+
expect(() => parseFullQualifiedClientId('userid:clientid:domain')).toThrow();
7070
});
7171
});
7272

packages/store-engine-fs/src/index.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('FileEngine', () => {
7777
expect(FileEngine.enforcePathRestrictions(unixFolder, 'users/me')).toBeDefined();
7878
expect(FileEngine.enforcePathRestrictions(unixFolder, 'a/b/c/d/e/f/g/../../../../ok')).toBeDefined();
7979
expect(FileEngine.enforcePathRestrictions(unixFolder, 'a/b/c/../../../')).toBeDefined();
80-
expect(enforcePathRestrictions(unixFolder, 'a/b/c/../../../../')).toThrowError(expectedError);
80+
expect(enforcePathRestrictions(unixFolder, 'a/b/c/../../../../')).toThrow();
8181
});
8282

8383
it('allows empty strings.', () => {
@@ -91,30 +91,30 @@ describe('FileEngine', () => {
9191

9292
it('throws errors on path traversals.', () => {
9393
FileEngine.path = path.win32;
94-
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\test\\..\\..')).toThrowError(expectedError);
95-
expect(enforcePathRestrictions(windowsFolder, '\\malicious\\..\\\\..entry\\..\\..')).toThrowError(expectedError);
96-
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\entry\\..\\..')).toThrowError(expectedError);
97-
expect(enforcePathRestrictions(windowsFolder, '\\\\server\\..\\..\\..')).toThrowError(expectedError);
98-
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\entry\\..\\')).toThrowError(expectedError);
99-
expect(enforcePathRestrictions(windowsFolder, '..\\etc')).toThrowError(expectedError);
94+
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\test\\..\\..')).toThrow();
95+
expect(enforcePathRestrictions(windowsFolder, '\\malicious\\..\\\\..entry\\..\\..')).toThrow();
96+
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\entry\\..\\..')).toThrow();
97+
expect(enforcePathRestrictions(windowsFolder, '\\\\server\\..\\..\\..')).toThrow();
98+
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\entry\\..\\')).toThrow();
99+
expect(enforcePathRestrictions(windowsFolder, '..\\etc')).toThrow();
100100

101101
FileEngine.path = path.posix;
102-
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrowError(expectedError);
103-
expect(enforcePathRestrictions(unixFolder, '/malicious/../../../entry/../test')).toThrowError(expectedError);
104-
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/..')).toThrowError(expectedError);
105-
expect(enforcePathRestrictions(unixFolder, 'documents/../../../../../etc/hosts')).toThrowError(expectedError);
106-
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/../')).toThrowError(expectedError);
107-
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrowError(expectedError);
108-
expect(enforcePathRestrictions(unixFolder, 'users/../../tigris')).toThrowError(expectedError);
109-
expect(enforcePathRestrictions(unixFolder, 'users/../tigris/../../')).toThrowError(expectedError);
102+
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrow();
103+
expect(enforcePathRestrictions(unixFolder, '/malicious/../../../entry/../test')).toThrow();
104+
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/..')).toThrow();
105+
expect(enforcePathRestrictions(unixFolder, 'documents/../../../../../etc/hosts')).toThrow();
106+
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/../')).toThrow();
107+
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrow();
108+
expect(enforcePathRestrictions(unixFolder, 'users/../../tigris')).toThrow();
109+
expect(enforcePathRestrictions(unixFolder, 'users/../tigris/../../')).toThrow();
110110
});
111111

112112
it('throws errors when attempting to use the root folder as a trusted root.', () => {
113113
FileEngine.path = path.posix;
114-
expect(enforcePathRestrictions('/', 'etc/hosts')).toThrowError(expectedError);
114+
expect(enforcePathRestrictions('/', 'etc/hosts')).toThrow();
115115

116116
FileEngine.path = path.win32;
117-
expect(enforcePathRestrictions('C:/', '\\Windows\\System32\\drivers\\etc\\hosts')).toThrowError(expectedError);
117+
expect(enforcePathRestrictions('C:/', '\\Windows\\System32\\drivers\\etc\\hosts')).toThrow();
118118
});
119119

120120
it('is applied to all store operations.', async () => {

packages/store-engine/src/main/test/deleteSpec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export const deleteSpec = {
5757
await engine.delete(TABLE_NAME, lisa.primaryKey);
5858
const primaryKeys = await engine.readAllPrimaryKeys(TABLE_NAME);
5959
expect(primaryKeys.length).toBe(expectedRemainingEntities);
60-
expect(primaryKeys.includes(homer.primaryKey));
61-
expect(primaryKeys.includes(marge.primaryKey));
60+
expect(primaryKeys.includes(homer.primaryKey)).toBeTrue();
61+
expect(primaryKeys.includes(marge.primaryKey)).toBeTrue();
6262
},
6363
'returns the primary key of a deleted record.': async (engine: CRUDEngine) => {
6464
const PRIMARY_KEY = 'primary-key';

packages/store-engine/src/main/test/readAllPrimaryKeysSpec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export const readAllPrimaryKeysSpec = {
5454
]);
5555
const primaryKeys = await engine.readAllPrimaryKeys(TABLE_NAME);
5656
expect(primaryKeys.length).toBe(3);
57-
expect(primaryKeys.includes(homer.primaryKey));
58-
expect(primaryKeys.includes(lisa.primaryKey));
59-
expect(primaryKeys.includes(marge.primaryKey));
57+
expect(primaryKeys.includes(homer.primaryKey)).toBeTrue();
58+
expect(primaryKeys.includes(lisa.primaryKey)).toBeTrue();
59+
expect(primaryKeys.includes(marge.primaryKey)).toBeTrue();
6060
},
6161
};

yarn.lock

Lines changed: 13 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -4436,13 +4436,6 @@ __metadata:
44364436
languageName: node
44374437
linkType: hard
44384438

4439-
"@types/json-schema@npm:^7.0.7":
4440-
version: 7.0.7
4441-
resolution: "@types/json-schema@npm:7.0.7"
4442-
checksum: ea3b409235862d28122751158f4054e729e31ad844bd7b8b23868f38c518047b1c0e8e4e7cc293e02c31a2fb8cfc8a4506c2de2a745cf78b218e064fb8898cd4
4443-
languageName: node
4444-
linkType: hard
4445-
44464439
"@types/json5@npm:^0.0.29":
44474440
version: 0.0.29
44484441
resolution: "@types/json5@npm:0.0.29"
@@ -4949,22 +4942,6 @@ __metadata:
49494942
languageName: node
49504943
linkType: hard
49514944

4952-
"@typescript-eslint/experimental-utils@npm:^4.0.1":
4953-
version: 4.29.0
4954-
resolution: "@typescript-eslint/experimental-utils@npm:4.29.0"
4955-
dependencies:
4956-
"@types/json-schema": ^7.0.7
4957-
"@typescript-eslint/scope-manager": 4.29.0
4958-
"@typescript-eslint/types": 4.29.0
4959-
"@typescript-eslint/typescript-estree": 4.29.0
4960-
eslint-scope: ^5.1.1
4961-
eslint-utils: ^3.0.0
4962-
peerDependencies:
4963-
eslint: "*"
4964-
checksum: 1c1daddb9b0464d8df422b598cecd4e931fe40109b9f43067c00aa5fd0a046c2bfc06e82da6ba27d667cb4f12964c21521027c4fec886a97285e6b5a0b3fe943
4965-
languageName: node
4966-
linkType: hard
4967-
49684945
"@typescript-eslint/parser@npm:5.40.1":
49694946
version: 5.40.1
49704947
resolution: "@typescript-eslint/parser@npm:5.40.1"
@@ -4982,16 +4959,6 @@ __metadata:
49824959
languageName: node
49834960
linkType: hard
49844961

4985-
"@typescript-eslint/scope-manager@npm:4.29.0":
4986-
version: 4.29.0
4987-
resolution: "@typescript-eslint/scope-manager@npm:4.29.0"
4988-
dependencies:
4989-
"@typescript-eslint/types": 4.29.0
4990-
"@typescript-eslint/visitor-keys": 4.29.0
4991-
checksum: 3f3d211ae56a0b35e21d16dca4be5d8599928eb97045d191e2ab8065b90312b92c0b15a9c37dc2022056a1be3a2aa83ff704f3ecf41155df772951e12dc341bc
4992-
languageName: node
4993-
linkType: hard
4994-
49954962
"@typescript-eslint/scope-manager@npm:5.40.1":
49964963
version: 5.40.1
49974964
resolution: "@typescript-eslint/scope-manager@npm:5.40.1"
@@ -5019,38 +4986,13 @@ __metadata:
50194986
languageName: node
50204987
linkType: hard
50214988

5022-
"@typescript-eslint/types@npm:4.29.0":
5023-
version: 4.29.0
5024-
resolution: "@typescript-eslint/types@npm:4.29.0"
5025-
checksum: ce42a50ba69f6eaa83661b752132ddd058a619025dfccf16f1cc4e21dcfda57787e2bce106b2396cc7ebf6b29473460f90ac12d277a2115c1a9000b6236fcfcb
5026-
languageName: node
5027-
linkType: hard
5028-
50294989
"@typescript-eslint/types@npm:5.40.1":
50304990
version: 5.40.1
50314991
resolution: "@typescript-eslint/types@npm:5.40.1"
50324992
checksum: 2430c799667c820903df7ef39bc4c2762cb7654dbb8525d56f37e73f8cefb82186b80654dbbe0294c5b55affe929c641cdb90232e2749dcd7838f9e500a41549
50334993
languageName: node
50344994
linkType: hard
50354995

5036-
"@typescript-eslint/typescript-estree@npm:4.29.0":
5037-
version: 4.29.0
5038-
resolution: "@typescript-eslint/typescript-estree@npm:4.29.0"
5039-
dependencies:
5040-
"@typescript-eslint/types": 4.29.0
5041-
"@typescript-eslint/visitor-keys": 4.29.0
5042-
debug: ^4.3.1
5043-
globby: ^11.0.3
5044-
is-glob: ^4.0.1
5045-
semver: ^7.3.5
5046-
tsutils: ^3.21.0
5047-
peerDependenciesMeta:
5048-
typescript:
5049-
optional: true
5050-
checksum: e1f893c2dff1bb2eb800039871ba08a9d96d8d3ca976389426df8e75438031afa443b863925582fa610d19c40d4b9a787d130ed8bcf11c4aeb2cb63c78d592c3
5051-
languageName: node
5052-
linkType: hard
5053-
50544996
"@typescript-eslint/typescript-estree@npm:5.40.1":
50554997
version: 5.40.1
50564998
resolution: "@typescript-eslint/typescript-estree@npm:5.40.1"
@@ -5069,7 +5011,7 @@ __metadata:
50695011
languageName: node
50705012
linkType: hard
50715013

5072-
"@typescript-eslint/utils@npm:5.40.1":
5014+
"@typescript-eslint/utils@npm:5.40.1, @typescript-eslint/utils@npm:^5.10.0":
50735015
version: 5.40.1
50745016
resolution: "@typescript-eslint/utils@npm:5.40.1"
50755017
dependencies:
@@ -5087,16 +5029,6 @@ __metadata:
50875029
languageName: node
50885030
linkType: hard
50895031

5090-
"@typescript-eslint/visitor-keys@npm:4.29.0":
5091-
version: 4.29.0
5092-
resolution: "@typescript-eslint/visitor-keys@npm:4.29.0"
5093-
dependencies:
5094-
"@typescript-eslint/types": 4.29.0
5095-
eslint-visitor-keys: ^2.0.0
5096-
checksum: 3be974c6b2dd4eee3dbe01409bd6bf0e175bac5fe42df4256782ad1a4b05aded64bee711f0b6e597f732b1b506f72c25f7415370211af4b526557e872fc7f94b
5097-
languageName: node
5098-
linkType: hard
5099-
51005032
"@typescript-eslint/visitor-keys@npm:5.40.1":
51015033
version: 5.40.1
51025034
resolution: "@typescript-eslint/visitor-keys@npm:5.40.1"
@@ -9350,7 +9282,7 @@ __metadata:
93509282
languageName: node
93519283
linkType: hard
93529284

9353-
"debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.3, debug@npm:~4.3.1, debug@npm:~4.3.2":
9285+
"debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.3, debug@npm:~4.3.1, debug@npm:~4.3.2":
93549286
version: 4.3.3
93559287
resolution: "debug@npm:4.3.3"
93569288
dependencies:
@@ -10561,18 +10493,20 @@ __metadata:
1056110493
languageName: node
1056210494
linkType: hard
1056310495

10564-
"eslint-plugin-jest@npm:24.4.0":
10565-
version: 24.4.0
10566-
resolution: "eslint-plugin-jest@npm:24.4.0"
10496+
"eslint-plugin-jest@npm:27.1.3":
10497+
version: 27.1.3
10498+
resolution: "eslint-plugin-jest@npm:27.1.3"
1056710499
dependencies:
10568-
"@typescript-eslint/experimental-utils": ^4.0.1
10500+
"@typescript-eslint/utils": ^5.10.0
1056910501
peerDependencies:
10570-
"@typescript-eslint/eslint-plugin": ">= 4"
10571-
eslint: ">=5"
10502+
"@typescript-eslint/eslint-plugin": ^5.0.0
10503+
eslint: ^7.0.0 || ^8.0.0
1057210504
peerDependenciesMeta:
1057310505
"@typescript-eslint/eslint-plugin":
1057410506
optional: true
10575-
checksum: ffa3f019420e6263db6d1236fda6fd2650cea89e84bd975bd56813aa72e46f997d5350c3d08e1608f3049854e9ff651028b692356b1615cb7bd1862f71ed0f88
10507+
jest:
10508+
optional: true
10509+
checksum: 427f39ad4bb50b4e50a1f6aba04962ee3686e25b716d3e4dff47a304c2a352a35b032fec7350b84dc6362838525d93a70f7ae0f961b182c79bf602e90ebb1a55
1057610510
languageName: node
1057710511
linkType: hard
1057810512

@@ -11166,20 +11100,6 @@ __metadata:
1116611100
languageName: node
1116711101
linkType: hard
1116811102

11169-
"fast-glob@npm:^3.1.1":
11170-
version: 3.2.5
11171-
resolution: "fast-glob@npm:3.2.5"
11172-
dependencies:
11173-
"@nodelib/fs.stat": ^2.0.2
11174-
"@nodelib/fs.walk": ^1.2.3
11175-
glob-parent: ^5.1.0
11176-
merge2: ^1.3.0
11177-
micromatch: ^4.0.2
11178-
picomatch: ^2.2.1
11179-
checksum: 5d6772c9b63dbb739d60b5630851e1f2cbf9744119e0968eac44c9f8cbc2d3d5cb4f2f0c74715ccb23daa336c87bea42186ed367e6c991afee61cd3d967320eb
11180-
languageName: node
11181-
linkType: hard
11182-
1118311103
"fast-glob@npm:^3.2.11":
1118411104
version: 3.2.12
1118511105
resolution: "fast-glob@npm:3.2.12"
@@ -12085,7 +12005,7 @@ __metadata:
1208512005
languageName: node
1208612006
linkType: hard
1208712007

12088-
"glob-parent@npm:^5.1.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2":
12008+
"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2":
1208912009
version: 5.1.2
1209012010
resolution: "glob-parent@npm:5.1.2"
1209112011
dependencies:
@@ -12239,20 +12159,6 @@ __metadata:
1223912159
languageName: node
1224012160
linkType: hard
1224112161

12242-
"globby@npm:^11.0.3":
12243-
version: 11.0.3
12244-
resolution: "globby@npm:11.0.3"
12245-
dependencies:
12246-
array-union: ^2.1.0
12247-
dir-glob: ^3.0.1
12248-
fast-glob: ^3.1.1
12249-
ignore: ^5.1.4
12250-
merge2: ^1.3.0
12251-
slash: ^3.0.0
12252-
checksum: 7d0d3e1bcb618730c8c45edb7c0067f048e1d6a6f561bfaf9c6fb5dd8274ac98b0e1e08109a160a9da1c8f1a9ab692ed36ba719517731f4ed1b29ac203992392
12253-
languageName: node
12254-
linkType: hard
12255-
1225612162
"globby@npm:^11.0.4, globby@npm:^11.1.0":
1225712163
version: 11.1.0
1225812164
resolution: "globby@npm:11.1.0"
@@ -12962,13 +12868,6 @@ __metadata:
1296212868
languageName: node
1296312869
linkType: hard
1296412870

12965-
"ignore@npm:^5.1.4":
12966-
version: 5.1.8
12967-
resolution: "ignore@npm:5.1.8"
12968-
checksum: 967abadb61e2cb0e5c5e8c4e1686ab926f91bc1a4680d994b91947d3c65d04c3ae126dcdf67f08e0feeb8ff8407d453e641aeeddcc47a3a3cca359f283cf6121
12969-
languageName: node
12970-
linkType: hard
12971-
1297212871
"ignore@npm:^5.2.0":
1297312872
version: 5.2.0
1297412873
resolution: "ignore@npm:5.2.0"
@@ -20698,7 +20597,7 @@ __metadata:
2069820597
eslint-plugin-header: 3.1.1
2069920598
eslint-plugin-import: 2.26.0
2070020599
eslint-plugin-jasmine: 4.1.3
20701-
eslint-plugin-jest: 24.4.0
20600+
eslint-plugin-jest: 27.1.3
2070220601
eslint-plugin-jsdoc: 39.3.14
2070320602
eslint-plugin-no-unsanitized: 4.0.1
2070420603
eslint-plugin-prettier: 4.2.1

0 commit comments

Comments
 (0)