I'm using jest with babel and i want to debug my test.
I'm able to debug jest with node --debug-brk ./node_modules/.bin/jest --runInBand [any other arguments here] but lose all es6 source code info.
I know source-map-support is a babel feature not jest's, but jest should somehow tell babel to include source-map-support.
so far I've tried
- config
transformforjest
"transform": {
".*": "/scripts/jest/preprocessor.js"
}
- in my preprocess.js file I have
const register=require("babel-register")
register();
....
module.exports = {
process: function(src, filename) {
const options = assign({}, babelOptions, {
filename: filename,
retainLines: true,
sourceMap:true, // I added this line
});
return babel.transform(src, options).code;
}
but this doesn't work. any ideas?