Skip to content

Commit

Permalink
RN: Fix deepFreezeAndThrowOnMutationInDev-test for Node v8.1.0
Browse files Browse the repository at this point in the history
Reviewed By: raluca-elena

Differential Revision: D5222219

fbshipit-source-id: e34903a506b8e6e0c81e1c21fd9e8e015b25b2d7
  • Loading branch information
yungsters authored and facebook-github-bot committed Jun 9, 2017
1 parent a1321ae commit 82edc13
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ describe('deepFreezeAndThrowOnMutationInDev', function() {
var o = {oldKey: 'value'};
deepFreezeAndThrowOnMutationInDev(o);
expect(() => { o.newKey = 'value'; })
.toThrowError('Can\'t add property newKey, object is not extensible');
.toThrowError(
/(Cannot|Can't) add property newKey, object is not extensible/
);
expect(o.newKey).toBe(undefined);
});

Expand Down

0 comments on commit 82edc13

Please sign in to comment.