summaryrefslogtreecommitdiff
path: root/libdeno/libdeno_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'libdeno/libdeno_test.js')
-rw-r--r--libdeno/libdeno_test.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/libdeno/libdeno_test.js b/libdeno/libdeno_test.js
index 1aa09a775..c9eaaa0ca 100644
--- a/libdeno/libdeno_test.js
+++ b/libdeno/libdeno_test.js
@@ -173,3 +173,16 @@ global.PromiseRejectCatchHandling = () => {
}
})();
}
+
+global.Shared = () => {
+ const ab = libdeno.shared;
+ assert(ab instanceof ArrayBuffer);
+ assert(ab.byteLength === 3);
+ const ui8 = new Uint8Array(ab);
+ assert(ui8[0] === 0);
+ assert(ui8[1] === 1);
+ assert(ui8[2] === 2);
+ ui8[0] = 42;
+ ui8[1] = 43;
+ ui8[2] = 44;
+}