Skip to content

Commit dda903d

Browse files
filipesilvahansl
authored andcommitted
test: manually exit process on windows
1 parent 523d971 commit dda903d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,18 @@ if (process.argv.indexOf('--spec-reporter') != -1) {
142142
// Manually set exit code (needed with custom reporters)
143143
runner.onComplete((success: boolean) => {
144144
process.exitCode = success ? 0 : 1;
145+
if (process.platform.startsWith('win')) {
146+
// TODO(filipesilva): finish figuring out why this happens.
147+
// We should not need to force exit here, but when:
148+
// - on windows
149+
// - running webpack-dev-server
150+
// - with ngtools/webpack on the compilation
151+
// Something seems to hang and the process never exists.
152+
// This does not happen on linux, nor with webpack on watch mode.
153+
// Until this is figured out, we need to exit the process manually after tests finish
154+
// otherwise appveyor will hang until it timeouts.
155+
process.exit();
156+
}
145157
});
146158

147159

0 commit comments

Comments
 (0)