Closed MGray55 closed 6 years ago
Got around different whitespace in snaps (on OSX vs Linux) by using
jest.mock('react-table', () => 'ReactTable');
I don't need to test React Table in my unit tests - (which is where the whitespace issue is happening). Wanted to post findings here in case anyone else runs into a similar error.
@MGray55 your solution did not solve it for me...
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Similar to previous issue https://github.com/facebook/jest/issues/3813 Was working until 06/12/2018. Space being inserted in className definitions as displayed below (see rt-rh and rt-resizeable-header'
Snapshot formatting between local (MacOSX) and CircleCI build slightly different causing test failure `
expect(value).toMatchSnapshot()
To Reproduce
Original test is pretty straight forward. The code formatting in question is on happening on the header of a react-table component:
Expected behavior
The formatting of snapshots in each environments should match when using the same package.json for dependencies.
Currently using:
But also tried updating to (with no change in result):