Fix Log._getCallerDetails() regex.

1. Now it matches `logging:test`, not `logging:tests`.
2. Now it is okay with server-side source maps, by matching
`/packages/logging/foo.js` in addition to `/packages/logging.js`.
This commit is contained in:
Emily Stark
2014-06-24 15:12:33 -07:00
parent b125db0602
commit 1beb5ffe09
2 changed files with 1 additions and 3 deletions

View File

@@ -97,8 +97,7 @@ Log._getCallerDetails = function () {
return {file: "eval"};
}
// XXX probably wants to be / or .js in case no source maps
if (!line.match(/packages\/logging(?:\/|(?::tests)?\.js)/))
if (!line.match(/packages\/logging(?:\/|(?::test)?(\/|\.js))/))
break;
}

View File

@@ -181,4 +181,3 @@ Tinytest.add("logging - format", function (test) {
level.charAt(0).toUpperCase() + '20120908-07:06:05.004' + utcOffsetStr + ' (app.js:42) message');
});
});