summaryrefslogtreecommitdiff
path: root/js/v8_source_maps_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/v8_source_maps_test.ts')
-rw-r--r--js/v8_source_maps_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/v8_source_maps_test.ts b/js/v8_source_maps_test.ts
new file mode 100644
index 000000000..90c123431
--- /dev/null
+++ b/js/v8_source_maps_test.ts
@@ -0,0 +1,17 @@
+// Copyright 2018 the Deno authors. All rights reserved. MIT license.
+import { test, assert, assertEqual } from "./test_util.ts";
+
+// This test demonstrates a bug:
+// https://github.com/denoland/deno/issues/808
+test(function evalErrorFormatted() {
+ let err;
+ try {
+ eval("boom");
+ } catch (e) {
+ err = e;
+ }
+ assert(!!err);
+ // tslint:disable-next-line:no-unused-expression
+ err.stack; // This would crash if err.stack is malformed
+ assertEqual(err.name, "ReferenceError");
+});