Skip to content

Commit

Permalink
chore(deps-dev): bump eslint-plugin-jest from 24.4.0 to 27.1.3 (#4515)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* fix: linter problems

* fix: toThrow breaking change

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Weiß <gitlab@weissadrian.com>
  • Loading branch information
dependabot[bot] and aweiss-dev committed Oct 19, 2022
1 parent efe340f commit e54186f
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 148 deletions.
8 changes: 3 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"jest/globals": true
},
"extends": ["./packages/eslint-config/eslintrc.js", "plugin:jest/recommended"],
"ignorePatterns": ["*config.js", "demo/", "bin/", "eslint*", "webpack*"],
"ignorePatterns": ["*config.js", "demo/", "bin/", "eslint*", "webpack*", "*.js"],
"globals": {
"NodeJS": "readonly"
},
Expand All @@ -31,9 +31,7 @@
"jest/no-done-callback": "warn",
"jest/no-disabled-tests": "warn",
"jest/no-conditional-expect": "warn",
"jest/valid-expect": "warn",
"jest/no-try-expect": "warn",
"jest/valid-title": "warn",
"jest/valid-describe": "warn"
"jest/valid-describe-callback": "warn",
"jest/valid-title": "warn"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jasmine": "4.1.3",
"eslint-plugin-jest": "24.4.0",
"eslint-plugin-jest": "27.1.3",
"eslint-plugin-jsdoc": "39.3.14",
"eslint-plugin-no-unsanitized": "4.0.1",
"eslint-plugin-prettier": "4.2.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/bazinga64/src/Converter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('toArrayBufferView', () => {
bazinga64.Converter.toArrayBufferView(new Error() as any);
};

expect(test).toThrowError(bazinga64.UnsupportedInputError);
expect(test).toThrow();
});
});

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

expect(test).toThrowError(bazinga64.UnsupportedInputError);
expect(test).toThrow();
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/bazinga64/src/Decoder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('fromBase64', () => {
it('does not decode from an array with an invalid length', () => {
expect(() => {
bazinga64.Decoder.fromBase64(helloDecodedArray);
}).toThrowError('Invalid string. Length must be a multiple of 4.');
}).toThrow();
});

it('decodes into a byte array', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/commons/src/main/util/ArrayUtil.test.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('ArrayUtil', () => {
it('breaks if being used with non-array types.', () => {
const array = [1, 3, 3, 7];
const notAnArray = 1447;
expect(() => ArrayUtil.getIntersection(array, notAnArray)).toThrowError(Error);
expect(() => ArrayUtil.getIntersection(array, notAnArray)).toThrow();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ describe('parseFullQualifiedClientId', () => {
});

it('throws an error when a wrong id is given', () => {
expect(() => parseFullQualifiedClientId('')).toThrow('corrupted');
expect(() => parseFullQualifiedClientId('userid:clientid:domain')).toThrow('corrupted');
expect(() => parseFullQualifiedClientId('')).toThrow();
expect(() => parseFullQualifiedClientId('userid:clientid:domain')).toThrow();
});
});

Expand Down
34 changes: 17 additions & 17 deletions packages/store-engine-fs/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('FileEngine', () => {
expect(FileEngine.enforcePathRestrictions(unixFolder, 'users/me')).toBeDefined();
expect(FileEngine.enforcePathRestrictions(unixFolder, 'a/b/c/d/e/f/g/../../../../ok')).toBeDefined();
expect(FileEngine.enforcePathRestrictions(unixFolder, 'a/b/c/../../../')).toBeDefined();
expect(enforcePathRestrictions(unixFolder, 'a/b/c/../../../../')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'a/b/c/../../../../')).toThrow();
});

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

it('throws errors on path traversals.', () => {
FileEngine.path = path.win32;
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\test\\..\\..')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, '\\malicious\\..\\\\..entry\\..\\..')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\entry\\..\\..')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, '\\\\server\\..\\..\\..')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\entry\\..\\')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, '..\\etc')).toThrowError(expectedError);
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\test\\..\\..')).toThrow();
expect(enforcePathRestrictions(windowsFolder, '\\malicious\\..\\\\..entry\\..\\..')).toThrow();
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\entry\\..\\..')).toThrow();
expect(enforcePathRestrictions(windowsFolder, '\\\\server\\..\\..\\..')).toThrow();
expect(enforcePathRestrictions(windowsFolder, 'malicious\\..\\..\\entry\\..\\')).toThrow();
expect(enforcePathRestrictions(windowsFolder, '..\\etc')).toThrow();

FileEngine.path = path.posix;
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, '/malicious/../../../entry/../test')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/..')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'documents/../../../../../etc/hosts')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/../')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'users/../../tigris')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, 'users/../tigris/../../')).toThrowError(expectedError);
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrow();
expect(enforcePathRestrictions(unixFolder, '/malicious/../../../entry/../test')).toThrow();
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/..')).toThrow();
expect(enforcePathRestrictions(unixFolder, 'documents/../../../../../etc/hosts')).toThrow();
expect(enforcePathRestrictions(unixFolder, 'malicious/../../../entry/../')).toThrow();
expect(enforcePathRestrictions(unixFolder, '../etc')).toThrow();
expect(enforcePathRestrictions(unixFolder, 'users/../../tigris')).toThrow();
expect(enforcePathRestrictions(unixFolder, 'users/../tigris/../../')).toThrow();
});

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

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

it('is applied to all store operations.', async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/store-engine/src/main/test/deleteSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export const deleteSpec = {
await engine.delete(TABLE_NAME, lisa.primaryKey);
const primaryKeys = await engine.readAllPrimaryKeys(TABLE_NAME);
expect(primaryKeys.length).toBe(expectedRemainingEntities);
expect(primaryKeys.includes(homer.primaryKey));
expect(primaryKeys.includes(marge.primaryKey));
expect(primaryKeys.includes(homer.primaryKey)).toBeTrue();
expect(primaryKeys.includes(marge.primaryKey)).toBeTrue();
},
'returns the primary key of a deleted record.': async (engine: CRUDEngine) => {
const PRIMARY_KEY = 'primary-key';
Expand Down
6 changes: 3 additions & 3 deletions packages/store-engine/src/main/test/readAllPrimaryKeysSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const readAllPrimaryKeysSpec = {
]);
const primaryKeys = await engine.readAllPrimaryKeys(TABLE_NAME);
expect(primaryKeys.length).toBe(3);
expect(primaryKeys.includes(homer.primaryKey));
expect(primaryKeys.includes(lisa.primaryKey));
expect(primaryKeys.includes(marge.primaryKey));
expect(primaryKeys.includes(homer.primaryKey)).toBeTrue();
expect(primaryKeys.includes(lisa.primaryKey)).toBeTrue();
expect(primaryKeys.includes(marge.primaryKey)).toBeTrue();
},
};
127 changes: 13 additions & 114 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4436,13 +4436,6 @@ __metadata:
languageName: node
linkType: hard

"@types/json-schema@npm:^7.0.7":
version: 7.0.7
resolution: "@types/json-schema@npm:7.0.7"
checksum: ea3b409235862d28122751158f4054e729e31ad844bd7b8b23868f38c518047b1c0e8e4e7cc293e02c31a2fb8cfc8a4506c2de2a745cf78b218e064fb8898cd4
languageName: node
linkType: hard

"@types/json5@npm:^0.0.29":
version: 0.0.29
resolution: "@types/json5@npm:0.0.29"
Expand Down Expand Up @@ -4949,22 +4942,6 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/experimental-utils@npm:^4.0.1":
version: 4.29.0
resolution: "@typescript-eslint/experimental-utils@npm:4.29.0"
dependencies:
"@types/json-schema": ^7.0.7
"@typescript-eslint/scope-manager": 4.29.0
"@typescript-eslint/types": 4.29.0
"@typescript-eslint/typescript-estree": 4.29.0
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
peerDependencies:
eslint: "*"
checksum: 1c1daddb9b0464d8df422b598cecd4e931fe40109b9f43067c00aa5fd0a046c2bfc06e82da6ba27d667cb4f12964c21521027c4fec886a97285e6b5a0b3fe943
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:5.40.1":
version: 5.40.1
resolution: "@typescript-eslint/parser@npm:5.40.1"
Expand All @@ -4982,16 +4959,6 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:4.29.0":
version: 4.29.0
resolution: "@typescript-eslint/scope-manager@npm:4.29.0"
dependencies:
"@typescript-eslint/types": 4.29.0
"@typescript-eslint/visitor-keys": 4.29.0
checksum: 3f3d211ae56a0b35e21d16dca4be5d8599928eb97045d191e2ab8065b90312b92c0b15a9c37dc2022056a1be3a2aa83ff704f3ecf41155df772951e12dc341bc
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:5.40.1":
version: 5.40.1
resolution: "@typescript-eslint/scope-manager@npm:5.40.1"
Expand Down Expand Up @@ -5019,38 +4986,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:4.29.0":
version: 4.29.0
resolution: "@typescript-eslint/types@npm:4.29.0"
checksum: ce42a50ba69f6eaa83661b752132ddd058a619025dfccf16f1cc4e21dcfda57787e2bce106b2396cc7ebf6b29473460f90ac12d277a2115c1a9000b6236fcfcb
languageName: node
linkType: hard

"@typescript-eslint/types@npm:5.40.1":
version: 5.40.1
resolution: "@typescript-eslint/types@npm:5.40.1"
checksum: 2430c799667c820903df7ef39bc4c2762cb7654dbb8525d56f37e73f8cefb82186b80654dbbe0294c5b55affe929c641cdb90232e2749dcd7838f9e500a41549
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:4.29.0":
version: 4.29.0
resolution: "@typescript-eslint/typescript-estree@npm:4.29.0"
dependencies:
"@typescript-eslint/types": 4.29.0
"@typescript-eslint/visitor-keys": 4.29.0
debug: ^4.3.1
globby: ^11.0.3
is-glob: ^4.0.1
semver: ^7.3.5
tsutils: ^3.21.0
peerDependenciesMeta:
typescript:
optional: true
checksum: e1f893c2dff1bb2eb800039871ba08a9d96d8d3ca976389426df8e75438031afa443b863925582fa610d19c40d4b9a787d130ed8bcf11c4aeb2cb63c78d592c3
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:5.40.1":
version: 5.40.1
resolution: "@typescript-eslint/typescript-estree@npm:5.40.1"
Expand All @@ -5069,7 +5011,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:5.40.1":
"@typescript-eslint/utils@npm:5.40.1, @typescript-eslint/utils@npm:^5.10.0":
version: 5.40.1
resolution: "@typescript-eslint/utils@npm:5.40.1"
dependencies:
Expand All @@ -5087,16 +5029,6 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:4.29.0":
version: 4.29.0
resolution: "@typescript-eslint/visitor-keys@npm:4.29.0"
dependencies:
"@typescript-eslint/types": 4.29.0
eslint-visitor-keys: ^2.0.0
checksum: 3be974c6b2dd4eee3dbe01409bd6bf0e175bac5fe42df4256782ad1a4b05aded64bee711f0b6e597f732b1b506f72c25f7415370211af4b526557e872fc7f94b
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:5.40.1":
version: 5.40.1
resolution: "@typescript-eslint/visitor-keys@npm:5.40.1"
Expand Down Expand Up @@ -9350,7 +9282,7 @@ __metadata:
languageName: node
linkType: hard

"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":
"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":
version: 4.3.3
resolution: "debug@npm:4.3.3"
dependencies:
Expand Down Expand Up @@ -10561,18 +10493,20 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-jest@npm:24.4.0":
version: 24.4.0
resolution: "eslint-plugin-jest@npm:24.4.0"
"eslint-plugin-jest@npm:27.1.3":
version: 27.1.3
resolution: "eslint-plugin-jest@npm:27.1.3"
dependencies:
"@typescript-eslint/experimental-utils": ^4.0.1
"@typescript-eslint/utils": ^5.10.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ">= 4"
eslint: ">=5"
"@typescript-eslint/eslint-plugin": ^5.0.0
eslint: ^7.0.0 || ^8.0.0
peerDependenciesMeta:
"@typescript-eslint/eslint-plugin":
optional: true
checksum: ffa3f019420e6263db6d1236fda6fd2650cea89e84bd975bd56813aa72e46f997d5350c3d08e1608f3049854e9ff651028b692356b1615cb7bd1862f71ed0f88
jest:
optional: true
checksum: 427f39ad4bb50b4e50a1f6aba04962ee3686e25b716d3e4dff47a304c2a352a35b032fec7350b84dc6362838525d93a70f7ae0f961b182c79bf602e90ebb1a55
languageName: node
linkType: hard

Expand Down Expand Up @@ -11166,20 +11100,6 @@ __metadata:
languageName: node
linkType: hard

"fast-glob@npm:^3.1.1":
version: 3.2.5
resolution: "fast-glob@npm:3.2.5"
dependencies:
"@nodelib/fs.stat": ^2.0.2
"@nodelib/fs.walk": ^1.2.3
glob-parent: ^5.1.0
merge2: ^1.3.0
micromatch: ^4.0.2
picomatch: ^2.2.1
checksum: 5d6772c9b63dbb739d60b5630851e1f2cbf9744119e0968eac44c9f8cbc2d3d5cb4f2f0c74715ccb23daa336c87bea42186ed367e6c991afee61cd3d967320eb
languageName: node
linkType: hard

"fast-glob@npm:^3.2.11":
version: 3.2.12
resolution: "fast-glob@npm:3.2.12"
Expand Down Expand Up @@ -12085,7 +12005,7 @@ __metadata:
languageName: node
linkType: hard

"glob-parent@npm:^5.1.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2":
"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2":
version: 5.1.2
resolution: "glob-parent@npm:5.1.2"
dependencies:
Expand Down Expand Up @@ -12239,20 +12159,6 @@ __metadata:
languageName: node
linkType: hard

"globby@npm:^11.0.3":
version: 11.0.3
resolution: "globby@npm:11.0.3"
dependencies:
array-union: ^2.1.0
dir-glob: ^3.0.1
fast-glob: ^3.1.1
ignore: ^5.1.4
merge2: ^1.3.0
slash: ^3.0.0
checksum: 7d0d3e1bcb618730c8c45edb7c0067f048e1d6a6f561bfaf9c6fb5dd8274ac98b0e1e08109a160a9da1c8f1a9ab692ed36ba719517731f4ed1b29ac203992392
languageName: node
linkType: hard

"globby@npm:^11.0.4, globby@npm:^11.1.0":
version: 11.1.0
resolution: "globby@npm:11.1.0"
Expand Down Expand Up @@ -12962,13 +12868,6 @@ __metadata:
languageName: node
linkType: hard

"ignore@npm:^5.1.4":
version: 5.1.8
resolution: "ignore@npm:5.1.8"
checksum: 967abadb61e2cb0e5c5e8c4e1686ab926f91bc1a4680d994b91947d3c65d04c3ae126dcdf67f08e0feeb8ff8407d453e641aeeddcc47a3a3cca359f283cf6121
languageName: node
linkType: hard

"ignore@npm:^5.2.0":
version: 5.2.0
resolution: "ignore@npm:5.2.0"
Expand Down Expand Up @@ -20698,7 +20597,7 @@ __metadata:
eslint-plugin-header: 3.1.1
eslint-plugin-import: 2.26.0
eslint-plugin-jasmine: 4.1.3
eslint-plugin-jest: 24.4.0
eslint-plugin-jest: 27.1.3
eslint-plugin-jsdoc: 39.3.14
eslint-plugin-no-unsanitized: 4.0.1
eslint-plugin-prettier: 4.2.1
Expand Down

0 comments on commit e54186f

Please sign in to comment.