Skip to content

Commit

Permalink
Remove error snapshot test
Browse files Browse the repository at this point in the history
I think there is a bug where an empty snapshot is treated as an 'outdated snapshot'.

If I delete the obsolute snapshot, and run ReactDOMFiber-test.js it generates a new snapshot.
But then when I run the test with the newly generated snapshot, it says "1 obsolete snapshot found",
At some point I will file an issue with Jest. For now going to skip the snapshot generation for the error message in the new test.
  • Loading branch information
flarnie committed Jul 20, 2017
1 parent e64c2c1 commit 0b0035c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1025,10 +1025,11 @@ describe('ReactDOMFiber', () => {
expect(container.innerHTML).toBe('<div>bar</div>');
// then we mess with the DOM before an update
// we know this will error - that is expected right now
// It's an error of type 'NotFoundError' with no message
expect(() => {
container.innerHTML = '<div>MEOW.</div>';
ReactDOM.render(<div key="2">baz</div>, container);
}).toThrowErrorMatchingSnapshot();
}).toThrowError();
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toContain(
'render(...): ' +
Expand Down

This file was deleted.

0 comments on commit 0b0035c

Please sign in to comment.