To reproduce:
- Run ./node_modules/.bin/jest- a snapshot is created in./__snapshots__/
- Run ./node_modules/.bin/jestagain.
Expected:
The test should pass.
Actual:
The test fails, as follows:
 FAIL  ./bug.test.js
  ● carriage returns are preserved
    Error
      Error: expect(value).toMatchSnapshot()
      
      Received value does not match stored snapshot 1.
      
      - Snapshot
      + Received
      
      @@ -1,7 +1,7 @@
       <div
         dangerouslySetInnerHTML={
           Object {
      -      "__html": "foo
      +      "__html": "foo
           bar",
           }
         } />
      at Object.<anonymous>.test (bug.test.js:7:16)
      at process._tickCallback (internal/process/next_tick.js:103:7)
  ✕ carriage returns are preserved (13ms)
Snapshot Summary
 › 1 snapshot test failed in 1 test suite. Inspect your code changes or re-run with `-u` to update them.
Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   1 failed, 1 total
Time:        0.983s, estimated 1s
Ran all test suites.
The snapshot looks like this:
exports[`test carriage returns are preserved 1`] = `
<div
  dangerouslySetInnerHTML={
    Object {
      "__html": "foo
    bar",
    }
  } />
`;