diff --git a/tools/tests/source-maps.js b/tools/tests/source-maps.js index bdde3ef793..dc6d948db7 100644 --- a/tools/tests/source-maps.js +++ b/tools/tests/source-maps.js @@ -1,7 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../fs/files'); -var catalog = require('../packaging/catalog/catalog.js'); function matchPath (text, doubleBS) { if (process.platform === 'win32') { @@ -17,9 +16,11 @@ selftest.define("source maps from checkout", ['checkout'], function () { try { throw new Error(); } catch (e) { + // this refers to the line number where the error is thrown + const errorLine = "17"; var index = (process.platform === 'win32') ? 2 : 1; const sourceMap = e.stack.split(":")[index]; - const result = (sourceMap === "17" || sourceMap === "18"); + const result = (sourceMap === errorLine); selftest.expectEqual(result, true); } });