Skip to content

Commit e3fc53a

Browse files
chore(deps-dev): Bump jest and @types/jest (#256)
* chore(deps-dev): Bump jest and @types/jest Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together. Updates `jest` from 29.7.0 to 30.2.0 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest) Updates `@types/jest` from 29.5.14 to 30.0.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: jest dependency-version: 30.2.0 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: "@types/jest" dependency-version: 30.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix tests Signed-off-by: Valerii Svydenko <[email protected]> * fixe license check Signed-off-by: Valerii Svydenko <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Valerii Svydenko <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Valerii Svydenko <[email protected]>
1 parent 75baeb5 commit e3fc53a

File tree

12 files changed

+1322
-980
lines changed

12 files changed

+1322
-980
lines changed

.deps/EXCLUDED/dev.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,25 @@ This file contains a manual contribution to .deps/dev.md and it's needed because
3131
| `@rollup/[email protected]` | transitive dependency |
3232
| `@rollup/[email protected]` | transitive dependency |
3333
| `@rollup/[email protected]` | transitive dependency |
34+
| `@emnapi/[email protected]` | transitive dependency |
35+
| `@emnapi/[email protected]` | transitive dependency |
36+
| `@unrs/[email protected]` | transitive dependency |
37+
| `@unrs/[email protected]` | transitive dependency |
38+
| `@unrs/[email protected]` | transitive dependency |
39+
| `@unrs/[email protected]` | transitive dependency |
40+
| `@unrs/[email protected]` | transitive dependency |
41+
| `@unrs/[email protected]` | transitive dependency |
42+
| `@unrs/[email protected]` | transitive dependency |
43+
| `@unrs/[email protected]` | transitive dependency |
44+
| `@unrs/[email protected]` | transitive dependency |
45+
| `@unrs/[email protected]` | transitive dependency |
46+
| `@unrs/[email protected]` | transitive dependency |
47+
| `@unrs/[email protected]` | transitive dependency |
48+
| `@unrs/[email protected]` | transitive dependency |
49+
| `@unrs/[email protected]` | transitive dependency |
50+
| `@unrs/[email protected]` | transitive dependency |
51+
| `@unrs/[email protected]` | transitive dependency |
52+
| `@unrs/[email protected]` | transitive dependency |
53+
| `@unrs/[email protected]` | transitive dependency |
54+
| `@unrs/[email protected]` | transitive dependency |
55+
| `[email protected]` | transitive dependency |

.deps/dev.md

Lines changed: 118 additions & 94 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
"reflect-metadata": "^0.2.2"
5151
},
5252
"devDependencies": {
53-
"@types/jest": "^29.5.14",
53+
"@types/jest": "^30.0.0",
5454
"@types/node": "^20.11.30",
5555
"axios": "^1.13.1",
5656
"eslint": "^9.5.0",
5757
"if-env": "^1.0.4",
58-
"jest": "^29.7.0",
58+
"jest": "^30.2.0",
5959
"prettier": "^3.3.2",
6060
"rimraf": "^6.0.1",
6161
"rollup": "^4.18.0",

tests/devfile-schema/devfile-schema-validator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('DevfileValidator', () => {
118118
};
119119
const version = '3.0.0';
120120

121-
expect(() => validator.validateDevfile(devfile, version)).toThrowError(
121+
expect(() => validator.validateDevfile(devfile, version)).toThrow(
122122
`Dev Workspace generator tool doesn't support devfile version: ${version}`,
123123
);
124124
});

tests/devfile/dev-container-component-finder.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ describe('Test DevContainerComponentFinder', () => {
227227
} as DevfileContext;
228228
const devWorkspaceSpecTemplateComponents = await devContainerComponentFinder.find(devfileContext);
229229
expect(devWorkspaceSpecTemplateComponents?.name).toBe('my-container-1');
230-
expect(console.warn).toBeCalledWith(
230+
expect(console.warn).toHaveBeenCalledWith(
231231
'More than one dev container component has been potentially found, taking the first one of my-container-1,my-container-2',
232232
);
233233
});

tests/editor/editor-resolver.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Test EditorResolver', () => {
5050
const dummy = { dummyContent: 'dummy' };
5151
urlFetcherFetchTextMock.mockResolvedValue(jsYaml.dump(dummy));
5252
const content = await editorResolver.loadEditor(myId);
53-
expect(urlFetcherFetchTextMock).toBeCalledWith('http://editor.yaml');
53+
expect(urlFetcherFetchTextMock).toHaveBeenCalledWith('http://editor.yaml');
5454
expect(content).toStrictEqual(dummy);
5555
});
5656
});

tests/entrypoint.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Test Entrypoint', () => {
3737
test('entrypoint', async () => {
3838
startMethodMock.mockResolvedValue(true);
3939
await require('../src/entrypoint');
40-
expect(startMethodMock).toBeCalled();
40+
expect(startMethodMock).toHaveBeenCalled();
4141
expect(process.exitCode).toBeUndefined();
4242
});
4343

@@ -47,7 +47,7 @@ describe('Test Entrypoint', () => {
4747
spyExit.mockReturnValue(value);
4848
await require('../src/entrypoint');
4949
startMethodMock.mockResolvedValue(false);
50-
expect(spyExit).toBeCalled();
51-
expect(startMethodMock).toBeCalled();
50+
expect(spyExit).toHaveBeenCalled();
51+
expect(startMethodMock).toHaveBeenCalled();
5252
});
5353
});

tests/fetch/url-fetcher.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,28 @@ describe('Test UrlFetcher', () => {
4848
const content = 'abcd';
4949
axiosGetMock.mockResolvedValue({ data: content });
5050
const value = await urlFetcher.fetchTextOptionalContent('http://fake-entry');
51-
expect(axiosGetMock).toBeCalledWith('http://fake-entry', { responseType: 'text' });
51+
expect(axiosGetMock).toHaveBeenCalledWith('http://fake-entry', { responseType: 'text' });
5252
expect(value).toBe(content);
5353
});
5454

5555
test('basic 404 error empty fetchTextOptionalContent', async () => {
5656
axiosGetMock.mockImplementation(() => Promise.reject(new Custom404Error()));
5757
const value = await urlFetcher.fetchTextOptionalContent('http://fake-entry');
58-
expect(axiosGetMock).toBeCalledWith('http://fake-entry', { responseType: 'text' });
58+
expect(axiosGetMock).toHaveBeenCalledWith('http://fake-entry', { responseType: 'text' });
5959
expect(value).toBeUndefined();
6060
});
6161

6262
test('basic 500 error empty fetchTextOptionalContent', async () => {
6363
axiosGetMock.mockImplementation(() => Promise.reject(new Custom500Error()));
6464
await expect(urlFetcher.fetchTextOptionalContent('http://fake-entry')).rejects.toThrow();
65-
expect(axiosGetMock).toBeCalledWith('http://fake-entry', { responseType: 'text' });
65+
expect(axiosGetMock).toHaveBeenCalledWith('http://fake-entry', { responseType: 'text' });
6666
});
6767

6868
test('basic fetchText', async () => {
6969
const content = 'abcd';
7070
axiosGetMock.mockResolvedValue({ data: content });
7171
const value = await urlFetcher.fetchText('http://fake-entry');
72-
expect(axiosGetMock).toBeCalledWith('http://fake-entry', { responseType: 'text' });
72+
expect(axiosGetMock).toHaveBeenCalledWith('http://fake-entry', { responseType: 'text' });
7373
expect(value).toBe(content);
7474
});
7575
});

tests/generate.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ metadata:
5151

5252
let context = await generate.generate(devfileContent, editorContent);
5353
// expect not to write the file
54-
expect(fsWriteFileSpy).not.toBeCalled();
54+
expect(fsWriteFileSpy).not.toHaveBeenCalled();
5555
expect(JSON.stringify(context.devfile)).toEqual(
5656
'{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"parent":{"id":"udi","registryUrl":"https://dummy-registry.io/","version":"1.2.0"}}',
5757
);
@@ -118,7 +118,7 @@ metadata:
118118

119119
let context = await generate.generate(devfileContent, editorContent);
120120
// expect not to write the file
121-
expect(fsWriteFileSpy).not.toBeCalled();
121+
expect(fsWriteFileSpy).not.toHaveBeenCalled();
122122
const expectedDevWorkspace = {
123123
apiVersion: 'workspace.devfile.io/v1alpha2',
124124
kind: 'DevWorkspace',
@@ -191,7 +191,7 @@ metadata:
191191

192192
let context = await generate.generate(devfileContent, editorContent);
193193
// expect not to write the file
194-
expect(fsWriteFileSpy).not.toBeCalled();
194+
expect(fsWriteFileSpy).not.toHaveBeenCalled();
195195
const expectedDevWorkspace = {
196196
apiVersion: 'workspace.devfile.io/v1alpha2',
197197
kind: 'DevWorkspace',
@@ -259,7 +259,7 @@ metadata:
259259

260260
let context = await generate.generate(devfileContent, editorContent);
261261
// expect not to write the file
262-
expect(fsWriteFileSpy).not.toBeCalled();
262+
expect(fsWriteFileSpy).not.toHaveBeenCalled();
263263
expect(JSON.stringify(context.devfile)).toEqual(
264264
'{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}',
265265
);
@@ -323,7 +323,7 @@ metadata:
323323

324324
let context = await generate.generate(devfileContent, editorContent);
325325
// expect not to write the file
326-
expect(fsWriteFileSpy).not.toBeCalled();
326+
expect(fsWriteFileSpy).not.toHaveBeenCalled();
327327
expect(JSON.stringify(context.devfile)).toEqual(
328328
'{"schemaVersion":"2.2.0","metadata":{"generateName":"custom-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}',
329329
);
@@ -388,7 +388,7 @@ metadata:
388388

389389
let context = await generate.generate(devfileContent, editorContent, fakeoutputDir);
390390
// expect to write the file
391-
expect(fsWriteFileSpy).toBeCalled();
391+
expect(fsWriteFileSpy).toHaveBeenCalled();
392392
expect(JSON.stringify(context.devfile)).toEqual(
393393
'{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}',
394394
);
@@ -453,7 +453,7 @@ metadata:
453453

454454
let context = await generate.generate(devfileContent, editorContent, fakeoutputDir, 'false');
455455
// expect to write the file
456-
expect(fsWriteFileSpy).toBeCalled();
456+
expect(fsWriteFileSpy).toHaveBeenCalled();
457457
expect(JSON.stringify(context.devfile)).toEqual(
458458
'{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","attributes":{"old":"attribute"},"mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}',
459459
);
@@ -519,7 +519,7 @@ metadata:
519519

520520
let context = await generate.generate(devfileContent, editorContent, fakeoutputDir, 'false');
521521
// expect to write the file
522-
expect(fsWriteFileSpy).toBeCalled();
522+
expect(fsWriteFileSpy).toHaveBeenCalled();
523523
expect(context.suffix).toEqual('');
524524
});
525525
});

0 commit comments

Comments
 (0)