diff options
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 89296d632..1af2585a5 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -448,6 +448,11 @@ const finalDenoNs = { resources: core.resources, close: core.close, ...denoNs, + // Deno.test and Deno.bench are noops here, but kept for compatibility; so + // that they don't cause errors when used outside of `deno test`/`deno bench` + // contexts. + test: () => {}, + bench: () => {}, }; const { |