From dfddbb6352051addf9f04ca5360e8eb3bd233d92 Mon Sep 17 00:00:00 2001 From: Alexandre Borela Date: Tue, 30 May 2017 10:30:42 -0300 Subject: [PATCH] test: fix tests --- tests/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/index.js b/tests/index.js index b51476d..404525b 100644 --- a/tests/index.js +++ b/tests/index.js @@ -11,8 +11,12 @@ import './lib'; // There’s no DOM available during the tests and the error stack is just a stub // that don’t need to be mapped. +RedBoxError.prototype.mapOnConstruction = function(error) { + this.state = { error, mapped: true } +} + RedBoxError.prototype.mapError = function(error) { - this.state = { error } + this.setState({ error, mapped: true }) } const beforeEach = (framesStub) => {