Skip to content

Commit f9cf7b9

Browse files
committed
test: add a non-structural file change to rebuild E2E
This helps validate and profile rebuilds when TypeScript can fully reuse a previous Program.
1 parent 4c54ca8 commit f9cf7b9

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

tests/legacy-cli/e2e/tests/basic/rebuild.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,34 @@ export default function() {
9797
`
9898
})
9999
]))
100+
.then(() => Promise.all([
101+
waitForAnyProcessOutputToMatch(validBundleRegEx, 20000),
102+
writeMultipleFiles({
103+
'src/app/app.module.ts': `
104+
105+
import { BrowserModule } from '@angular/platform-browser';
106+
import { NgModule } from '@angular/core';
107+
108+
import { AppComponent } from './app.component';
109+
110+
@NgModule({
111+
declarations: [
112+
AppComponent
113+
],
114+
imports: [
115+
BrowserModule
116+
],
117+
providers: [],
118+
bootstrap: [AppComponent]
119+
})
120+
export class AppModule { }
121+
122+
console.log('$$_E2E_GOLDEN_VALUE_1');
123+
export let X = '$$_E2E_GOLDEN_VALUE_2';
124+
console.log('File changed with no import/export changes');
125+
`,
126+
}),
127+
]))
100128
.then(() => wait(2000))
101129
.then(() => request('http://localhost:4200/main.js'))
102130
.then((body) => {
@@ -110,7 +138,7 @@ export default function() {
110138
throw new Error('Expected golden value 3.');
111139
}
112140
})
113-
.then(() => killAllProcesses(), (err: any) => {
141+
.then(() => killAllProcesses(), (err: unknown) => {
114142
killAllProcesses();
115143
throw err;
116144
});

0 commit comments

Comments
 (0)