mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
add help messages to Deno.test() sanitizers (#4887)
This commit is contained in:
parent
e9fa6b87ce
commit
833539fcaf
1 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue