Skip to content

Commit 42d0fac

Browse files
committed
Fail tests on unexpected exits, not on any stderr output
1 parent 00f0f7a commit 42d0fac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/integration-test.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ describe('Integration test', function () {
8181
// If the config parent folder doesn't exist at all, we'll see an ENOENT, that's ok:
8282
if (d.toString().includes('[ENOENT]')) return;
8383

84-
reject();
8584
stderr = stderr + d.toString();
8685
console.warn(d.toString());
8786
});
87+
88+
// Exit or error before our expected output means startup failed.
89+
serverProcess.on('close', reject);
90+
serverProcess.on('error', reject);
8891
});
8992
});
9093

0 commit comments

Comments
 (0)