mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix(source-maps): adjusted error line and made variables more descritive
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user