Skip to content

Commit dfddbb6

Browse files
boreladavidnpma
authored andcommitted
test: fix tests
1 parent d882f2d commit dfddbb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ import './lib';
1111

1212
// There’s no DOM available during the tests and the error stack is just a stub
1313
// that don’t need to be mapped.
14+
RedBoxError.prototype.mapOnConstruction = function(error) {
15+
this.state = { error, mapped: true }
16+
}
17+
1418
RedBoxError.prototype.mapError = function(error) {
15-
this.state = { error }
19+
this.setState({ error, mapped: true })
1620
}
1721

1822
const beforeEach = (framesStub) => {

0 commit comments

Comments
 (0)