diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-09-24 15:42:09 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-24 15:42:09 -0400 |
commit | be8f49b33263238f17d8cbb334a36db6385fced2 (patch) | |
tree | 2dc1e1294aa6ec22ce9fe0f47e235ec4c2bffd4b /js/v8_source_maps_test.ts | |
parent | 3fe4be07ca19b40a2444b714f5927ff155d66fed (diff) |
Add `toString` for CallSite of eval origin (#809)
Diffstat (limited to 'js/v8_source_maps_test.ts')
-rw-r--r-- | js/v8_source_maps_test.ts | 17 |
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"); +}); |