Add mock_runtime_test.

This commit is contained in:
Ryan Dahl 2018-06-11 17:01:35 +02:00
parent b042c7c071
commit 0e07e16dd6
7 changed files with 73 additions and 44 deletions

9
deno2/js/mock_runtime.js Normal file
View file

@ -0,0 +1,9 @@
// A simple runtime that doesn't involve typescript or protobufs to test
// libdeno.
const globalEval = eval;
const window = globalEval("this");
window['foo'] = () => {
deno_print("Hello world from foo");
return "foo";
}