Skip to content

Commit ecc9d0e

Browse files
filipesilvavikerman
authored andcommitted
test: update server builder specs
1 parent 91d7a6e commit ecc9d0e

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

packages/angular_devkit/build_angular/test/server/base_spec_large.ts

+12-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import { BrowserBuilderOutput } from '../../src/browser';
1313
import { createArchitect, host, veEnabled } from '../utils';
1414

1515

16-
// DISABLED_FOR_IVY These should pass but are currently not supported
17-
(veEnabled ? describe : xdescribe)('Server Builder', () => {
16+
describe('Server Builder', () => {
1817
const target = { project: 'app', target: 'server' };
1918
let architect: Architect;
2019

@@ -33,7 +32,12 @@ import { createArchitect, host, veEnabled } from '../utils';
3332

3433
const fileName = join(outputPath, 'main.js');
3534
const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName)));
36-
expect(content).toMatch(/AppServerModuleNgFactory/);
35+
36+
if (veEnabled) {
37+
expect(content).toMatch(/AppServerModuleNgFactory/);
38+
} else {
39+
expect(content).toMatch(/AppServerModule\.ngModuleDef/);
40+
}
3741

3842
await run.stop();
3943
});
@@ -68,16 +72,10 @@ import { createArchitect, host, veEnabled } from '../utils';
6872

6973
it('supports sourcemaps', async () => {
7074
const overrides = { sourceMap: true };
71-
7275
const run = await architect.scheduleTarget(target, overrides);
7376
const output = await run.result as BrowserBuilderOutput;
7477
expect(output.success).toBe(true);
75-
76-
const fileName = join(outputPath, 'main.js');
77-
const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName)));
78-
expect(content).toMatch(/AppServerModuleNgFactory/);
7978
expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBeTruthy();
80-
8179
await run.stop();
8280
});
8381

@@ -144,7 +142,11 @@ import { createArchitect, host, veEnabled } from '../utils';
144142

145143
const fileName = join(outputPath, 'main.js');
146144
const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName)));
147-
expect(content).toMatch(/AppServerModuleNgFactory/);
145+
if (veEnabled) {
146+
expect(content).toMatch(/AppServerModuleNgFactory/);
147+
} else {
148+
expect(content).toMatch(/AppServerModule\.ngModuleDef/);
149+
}
148150
}),
149151
take(1),
150152
).toPromise();

0 commit comments

Comments
 (0)