Add deno_send tests.

This commit is contained in:
Ryan Dahl 2018-06-11 18:17:28 +02:00
parent 0e07e16dd6
commit cbbe8ad999
4 changed files with 45 additions and 9 deletions

View file

@ -7,3 +7,13 @@ window['foo'] = () => {
return "foo";
}
function assert(cond) {
if (!cond) throw Error("assert failed");
}
function recvabc() {
deno_recv((msg) => {
assert(msg instanceof ArrayBuffer);
assert(msg.byteLength === 3);
});
}