diff options
Diffstat (limited to 'testLib')
-rw-r--r-- | testLib/sharedTestCases.js | 5 | ||||
-rw-r--r-- | testLib/throwError.js | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/testLib/sharedTestCases.js b/testLib/sharedTestCases.js index 611a1d6..aa18516 100644 --- a/testLib/sharedTestCases.js +++ b/testLib/sharedTestCases.js @@ -260,14 +260,11 @@ module.exports = function () { it("should not modify line numbers in stack traces", function () { var throwError = rewire("./throwError.js"); - if (process.env.running_under_istanbul === "1") { - return; - } try { throwError(); } catch (err) { if (err.stack) { - expect(err.stack.split("\n")[1]).to.match(/:7:11/); + expect(err.stack.split("\n")[1]).to.match(/:6:26/); } } }); diff --git a/testLib/throwError.js b/testLib/throwError.js index e85ea36..0993618 100644 --- a/testLib/throwError.js +++ b/testLib/throwError.js @@ -1,8 +1,7 @@ // Using deliberately const here because we know that we're transform const to let -const test = 1; +const a = "a"; module.exports = function () { - let test = 1; - - throw new Error(); + // Ensure that column numbers are correct + const b = "b"; throw new Error(); }; |