Skip to content

Commit

Permalink
fix(tests): Fix Jest error reporting
Browse files Browse the repository at this point in the history
Add configuration to babel transformation that allows Jest to report errors with the correct line

number.
  • Loading branch information
evansiroky committed Sep 28, 2016
1 parent b9ef80e commit 721671e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jestPreprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const jestPreset = require('babel-preset-jest')
module.exports = {
process: function (src) {
const transformCfg = {
presets: ['es2015', 'react', 'stage-0', jestPreset]
presets: ['es2015', 'react', 'stage-0', jestPreset],
retainLines: true
}
return babel.transform(src, transformCfg).code
}
Expand Down

0 comments on commit 721671e

Please sign in to comment.