diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-25 00:07:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 00:07:25 +0200 |
commit | 833539fcafa77f341b74498b37372a61c5f10418 (patch) | |
tree | c5bdacf96e9812d80847abb54d4326c1faba61fc /cli/js/testing.ts | |
parent | e9fa6b87cea7f564d69f2918b4811a570a770f73 (diff) |
add help messages to Deno.test() sanitizers (#4887)
Diffstat (limited to 'cli/js/testing.ts')
-rw-r--r-- | cli/js/testing.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/js/testing.ts b/cli/js/testing.ts index 6c56a2f71..fdb6c69fd 100644 --- a/cli/js/testing.ts +++ b/cli/js/testing.ts @@ -51,7 +51,10 @@ Before: - completed: ${pre.opsCompletedAsync} After: - dispatched: ${post.opsDispatchedAsync} - - completed: ${post.opsCompletedAsync}` + - completed: ${post.opsCompletedAsync} + +Make sure to await all promises returned from Deno APIs before +finishing test case.` ); }; } @@ -71,7 +74,10 @@ function assertResources( const postStr = JSON.stringify(post, null, 2); const msg = `Test case is leaking resources. Before: ${preStr} -After: ${postStr}`; +After: ${postStr} + +Make sure to close all open resource handles returned from Deno APIs before +finishing test case.`; assert(preStr === postStr, msg); }; } |