Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
test: try and close the demo server cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed Aug 28, 2019
1 parent 4b9407e commit 3d90fb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/disable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ test('agent can be disabled', async (t) => {
delete process.env.SNYK_BEACON_INTERVAL_MS;
delete process.env.SNYK_RUNTIME_AGENT_DISABLE;

demoApp.close();
await new Promise((resolve) => demoApp.close(resolve));
});
2 changes: 1 addition & 1 deletion test/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@ test('demo app reports a vuln method when called', async (t) => {
delete process.env.SNYK_SNAPSHOT_INTERVAL_MS;
delete process.env.SNYK_TRIGGER_EXTRA_VULN;

demoApp.close();
await new Promise((resolve) => demoApp.close(resolve));
});
5 changes: 2 additions & 3 deletions test/failures.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ test('node agent does not crash the demo app', async (t) => {
delete process.env.SNYK_HOMEBASE_URL;
delete process.env.SNYK_BEACON_INTERVAL_MS;

demoApp.close();

await new Promise((resolve) => demoApp.close(resolve));
});

test('node agent does not crash the demo app', async (t) => {
Expand All @@ -45,5 +44,5 @@ test('node agent does not crash the demo app', async (t) => {
delete process.env.SNYK_SNAPSHOT_INTERVAL_MS;
delete process.env.SNYK_BEACON_INTERVAL_MS;

demoApp.close();
await new Promise((resolve) => demoApp.close(resolve));
});

0 comments on commit 3d90fb9

Please sign in to comment.