summaryrefslogtreecommitdiff
path: root/core/libdeno/libdeno_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/libdeno/libdeno_test.js')
-rw-r--r--core/libdeno/libdeno_test.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/libdeno/libdeno_test.js b/core/libdeno/libdeno_test.js
index 156af1e47..17a6343cf 100644
--- a/core/libdeno/libdeno_test.js
+++ b/core/libdeno/libdeno_test.js
@@ -195,3 +195,27 @@ global.LibDenoEvalContextError = () => {
assert(!errInfo5.isCompileError); // is NOT a compilation error! (just eval)
assert(errInfo5.thrown.message === "Unexpected end of input");
};
+
+global.LibDenoEvalContextInvalidArgument = () => {
+ try {
+ Deno.core.evalContext();
+ } catch (e) {
+ assert(e instanceof TypeError);
+ assert(e.message === "Invalid Argument");
+ }
+};
+
+global.LibDenoPrintInvalidArgument = () => {
+ try {
+ Deno.core.print();
+ } catch (e) {
+ assert(e instanceof TypeError);
+ assert(e.message === "Invalid Argument");
+ }
+ try {
+ Deno.core.print(2, 3, 4);
+ } catch (e) {
+ assert(e instanceof TypeError);
+ assert(e.message === "Invalid Argument");
+ }
+};