Skip to content

Commit 5039b99

Browse files
committed
build: update jasmine dependencies to v6
See associated pull request for more information. Closes #32423 as a pr takeover
1 parent d5fd9b9 commit 5039b99

File tree

18 files changed

+575
-745
lines changed

18 files changed

+575
-745
lines changed

modules/testing/builder/src/jasmine-helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export const BUILD_TIMEOUT = 30_000;
2525

2626
const optionSchemaCache = new Map<string, json.schema.JsonSchema>();
2727

28+
let counter = 0;
29+
2830
export function describeBuilder<T>(
2931
builderHandler: BuilderHandlerFn<T & json.JsonObject>,
3032
options: { name?: string; schemaPath: string },
@@ -40,10 +42,8 @@ export function describeBuilder<T>(
4042
optionSchema,
4143
});
4244

43-
// This is needed as there are multiple describe calls for the same builder.
44-
jasmine.getEnv().configure({ forbidDuplicateNames: false });
45-
46-
describe(options.name || builderHandler.name, () => {
45+
// The counter is needed to avoid duplicate describe names as they are not allowed.
46+
describe((options.name || builderHandler.name) + ` (${counter++})`, () => {
4747
beforeEach(async () => {
4848
harness.resetProjectMetadata();
4949

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@types/express": "~5.0.1",
7474
"@types/http-proxy": "^1.17.4",
7575
"@types/ini": "^4.0.0",
76-
"@types/jasmine": "~5.1.0",
76+
"@types/jasmine": "~6.0.0",
7777
"@types/jasmine-reporters": "^2",
7878
"@types/karma": "^6.3.0",
7979
"@types/less": "^3.0.3",
@@ -105,8 +105,8 @@
105105
"http-proxy": "^1.18.1",
106106
"http-proxy-middleware": "3.0.5",
107107
"husky": "9.1.7",
108-
"jasmine": "~5.13.0",
109-
"jasmine-core": "~5.13.0",
108+
"jasmine": "~6.1.0",
109+
"jasmine-core": "~6.1.0",
110110
"jasmine-reporters": "^2.5.2",
111111
"jasmine-spec-reporter": "~7.0.0",
112112
"karma": "~6.4.0",

packages/angular/build/src/builders/karma/find-tests_spec.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

packages/angular/build/src/tools/babel/plugins/elide-angular-metadata_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('elide-angular-metadata Babel plugin', () => {
188188
);
189189

190190
it(
191-
'elides arrow-function-based ɵsetClassMetadataAsync',
191+
'elides ɵsetClassDebugInfo',
192192
testCase({
193193
input: `
194194
import { Component } from '@angular/core';

packages/angular/build/src/tools/babel/plugins/pure-toplevel-functions_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('pure-toplevel-functions Babel plugin', () => {
100100
);
101101

102102
it(
103-
'does not annotate call expressions inside function expressions',
103+
'does not annotate call expressions inside arrow functions',
104104
testCaseNoChange('const foo = () => { const result = someFunction(); }'),
105105
);
106106

@@ -115,7 +115,7 @@ describe('pure-toplevel-functions Babel plugin', () => {
115115
);
116116

117117
it(
118-
'does not annotate new expressions inside function expressions',
118+
'does not annotate new expressions inside arrow functions',
119119
testCaseNoChange('const foo = () => { const result = new SomeClass(); }'),
120120
);
121121

packages/angular/ssr/test/app_spec.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,6 @@ describe('AngularServerApp', () => {
309309
expect(await conditionalResponse?.text()).toBe('');
310310
});
311311

312-
it('should return configured headers for pages with specific header settings', async () => {
313-
const response = await app.handle(new Request('http://localhost/home-ssg'));
314-
const headers = response?.headers.entries() ?? [];
315-
expect(Object.fromEntries(headers)).toEqual({
316-
'etag': '"f799132d0a09e0fef93c68a12e443527700eb59e6f67fcb7854c3a60ff082fde"',
317-
'content-length': '28',
318-
'x-some-header': 'value',
319-
'content-type': 'text/html;charset=UTF-8',
320-
});
321-
});
322-
323312
it('should return null for a non-prerendered page', async () => {
324313
const response = await app.handle(new Request('http://localhost/unknown'));
325314
expect(response).toBeNull();

packages/angular_devkit/architect/src/api_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('Architect API', () => {
4040
for (const ts of Object.getOwnPropertyNames(goldens)) {
4141
const t: Target = goldens[ts];
4242

43-
it(`works for ${JSON.stringify(t)}`, () => {
43+
it(`works for ${JSON.stringify(ts)}`, () => {
4444
// We have some invalid goldens. Remove everything after the second :.
4545
const goldenTs = ts.replace(/(\w+:\w+(:\w*)?).*/, '$1');
4646
expect(targetStringFromTarget(t)).toEqual(goldenTs);

packages/angular_devkit/build_angular/src/builders/browser/specs/tsconfig-paths_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('Browser Builder tsconfig paths', () => {
1919
});
2020
afterEach(async () => host.restore().toPromise());
2121

22-
it('works', async () => {
22+
it('should resolve basic tsconfig paths', async () => {
2323
host.replaceInFile('src/app/app.module.ts', './app.component', '@root/app/app.component');
2424
host.replaceInFile(
2525
'tsconfig.json',
@@ -37,7 +37,7 @@ describe('Browser Builder tsconfig paths', () => {
3737
await browserBuild(architect, host, target);
3838
});
3939

40-
it('works', async () => {
40+
it('should resolve complex tsconfig paths with wildcards', async () => {
4141
host.writeMultipleFiles({
4242
'src/meaning-too.ts': 'export var meaning = 42;',
4343
'src/app/shared/meaning.ts': 'export var meaning = 42;',

packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/proxy_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as http from 'node:http';
1313
import { createArchitect, host } from '../../../testing/test-utils';
1414
import { SSRDevServerBuilderOutput } from '../index';
1515

16-
describe('Serve SSR Builder', () => {
16+
describe('Serve SSR Builder - Proxy', () => {
1717
const target = { project: 'app', target: 'serve-ssr' };
1818
const originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
1919
let architect: Architect;

packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/ssl_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Agent } from 'undici';
1313
import { createArchitect, host } from '../../../testing/test-utils';
1414
import { SSRDevServerBuilderOutput } from '../index';
1515

16-
describe('Serve SSR Builder', () => {
16+
describe('Serve SSR Builder - SSL', () => {
1717
const target = { project: 'app', target: 'serve-ssr' };
1818
const originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
1919
let architect: Architect;

0 commit comments

Comments
 (0)