Skip to content

Commit

Permalink
Adds tests for the overlay (facebook#2118)
Browse files Browse the repository at this point in the history
* Add get-source-map tests

* Fixtures shouldn't be formatted

* Add mapper tests

* Add stack-frame tests

* Add more util tests

* Add unmapper tests

* Add parser tests

* Switch to snapshots

* Snapshot more
  • Loading branch information
Timer authored and romaindso committed Jul 10, 2017
1 parent f28df27 commit 999f272
Show file tree
Hide file tree
Showing 32 changed files with 84,445 additions and 1 deletion.
86 changes: 86 additions & 0 deletions packages/react-error-overlay/fixtures/bundle-default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[
{
"functionName": "App.componentDidMount",
"fileName": "http://localhost:3000/static/js/bundle.js",
"lineNumber": 26122,
"columnNumber": 21,
"_originalFunctionName": "App.componentDidMount",
"_originalFileName": "webpack:///packages/react-scripts/template/src/App.js",
"_originalLineNumber": 7,
"_originalColumnNumber": 0,
"_scriptCode": [
{
"lineNumber": 26119,
"content": " _createClass(App, [{",
"highlight": false
},
{
"lineNumber": 26120,
"content": " key: 'componentDidMount',",
"highlight": false
},
{
"lineNumber": 26121,
"content": " value: function componentDidMount() {",
"highlight": false
},
{
"lineNumber": 26122,
"content": " document.body.missing();",
"highlight": true
},
{
"lineNumber": 26123,
"content": " }",
"highlight": false
},
{
"lineNumber": 26124,
"content": " }, {",
"highlight": false
},
{
"lineNumber": 26125,
"content": " key: 'render',",
"highlight": false
}
],
"_originalScriptCode": [
{
"lineNumber": 4,
"content": "",
"highlight": false
},
{
"lineNumber": 5,
"content": "class App extends Component {",
"highlight": false
},
{
"lineNumber": 6,
"content": " componentDidMount() {",
"highlight": false
},
{
"lineNumber": 7,
"content": " document.body.missing()",
"highlight": true
},
{
"lineNumber": 8,
"content": " }",
"highlight": false
},
{
"lineNumber": 9,
"content": "",
"highlight": false
},
{
"lineNumber": 10,
"content": " render() {",
"highlight": false
}
]
}
]
Loading

0 comments on commit 999f272

Please sign in to comment.