RN: Fix deepFreezeAndThrowOnMutationInDev-test for Node v8.1.0

Reviewed By: raluca-elena

Differential Revision: D5222219

fbshipit-source-id: e34903a506b8e6e0c81e1c21fd9e8e015b25b2d7
This commit is contained in:
Tim Yung 2017-06-09 15:55:54 -07:00 committed by Facebook Github Bot
parent a1321aedd7
commit 82edc131b0
1 changed files with 3 additions and 1 deletions

View File

@ -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);
});