Jasmine Typescript Console Reporter

A Jasmine Console Reporter that remaps Typescript files. This will use source maps to remap the error stack file paths and line numbers to the source typescript files.
Preview

Installation
npm i jasmine-ts-console-reporter
Usage
Create a helper file for jasmine, eg specs/helpers.js
const TSConsoleReporter = require('jasmine-ts-console-reporter');
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new TSConsoleReporter());
Custom sourceMapProvider
For more intricate usage scenarios, like using istanbul where the sourcemaps for instumented files are held in memory, you can locate the sourcemaps via a callback:
new TSConsoleReporter({
sourceMapProvider: (fileName) => {
const map = fetchMySourceMap(fileName);
return map ? { map } : null;
}
});
Custom stack filter
You can provide additional filtering for the stack trace (in addition to the built in exclusion of jasmine sources), this is useful for when you are using test frameworks that show up in the stack trace like typemoq.
new TSConsoleReporter({
filter: /^c:\/.*$/
});
new TSConsoleReporter({
filter: '**/ignored/**/*.ts'
});
Load the helper file in Jasmine, eg on node jasmine.json:
{
"helpers": [
"specs/helpers.js",
]
}