Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,13 @@ ${expectedInvariantTransformResult}`
`_prodInvariant('18', 'Foo', 'Bar') : void 0;`
);
});

it('should correctly transform invariants that are not in the error codes map', () => {
compare(
"invariant(condition, 'This is not a real error message.');",
`var _prodInvariant = require('shared/reactProdInvariant');

!condition ? invariant(false, 'This is not a real error message.') : void 0;`
);
});
});