Skip to content

Commit

Permalink
Check the error message instead of relying on the snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
hron committed Jul 1, 2018
1 parent 737bf8a commit 8f8effc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`prepro
<yellow></>"
`;
exports[`preset throws when preset is invalid 1`] = `
"<red><bold><bold>● <bold>Validation Error</>:</>
<red></>
<red> Preset <bold>react-native</> is invalid:</>
<red> Unexpected token } in JSON at position 104</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://facebook.github.io/jest/docs/configuration.html</>
<red></>"
`;
exports[`preset throws when preset not found 1`] = `
"<red><bold><bold>● <bold>Validation Error</>:</>
<red></>
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/__tests__/normalize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ describe('preset', () => {
},
{},
);
}).toThrowErrorMatchingSnapshot();
}).toThrowError(/Unexpected token }/);
});

test('works with "react-native"', () => {
Expand Down

0 comments on commit 8f8effc

Please sign in to comment.