Skip to content

Commit

Permalink
Check preprocessorOptions is present, as it's breaking tests if you d…
Browse files Browse the repository at this point in the history
…on't use a preprocessor. (#1482)
  • Loading branch information
adalbertoteixeira authored and cpojer committed Aug 27, 2016
1 parent 7f4b8d3 commit fb93ad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-jest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const createTransformer = (options: any) => {
): string {
let plugins = options.plugins || [];

if (preprocessorOptions.instrument) {
if (preprocessorOptions && preprocessorOptions.instrument) {
plugins = plugins.concat(require('babel-plugin-istanbul').default);
}

Expand Down

0 comments on commit fb93ad6

Please sign in to comment.