From 833539fcafa77f341b74498b37372a61c5f10418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 25 Apr 2020 00:07:25 +0200 Subject: add help messages to Deno.test() sanitizers (#4887) --- cli/js/testing.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cli/js') 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); }; } -- cgit v1.2.3