Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
borela authored and davidnpma committed May 31, 2017
1 parent d882f2d commit dfddbb6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit dfddbb6

Please sign in to comment.