summaryrefslogtreecommitdiff
path: root/js/v8_source_maps_test.ts
blob: 90c12343133a6e1727fd649654b1570ce4ee80c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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");
});