Remove absolute paths from your Jest snapshots
npm install jest-serializer-path





Remove absolute paths and normalize paths across all platforms in your Jest snapshots.
#### Quick Start
``bash`
npm install --save-dev jest-serializer-path
Add this to your package.json Jest config:
``
"jest": {
"snapshotSerializers": [
"jest-serializer-path"
]
}
Or include only in individual tests:
`js
const serializer = require('jest-serializer-path')
expect.addSnapshotSerializer(serializer)
`
All absolute paths will now be converted and saved in snapshots like so:
/path/to/my-proj/lib =>
/path/to/os-temp/nested/temp =>
/path/to/user-home/nested/home =>
#### Caveats
* All single backslashes (\) will be replaced by a forward slash (/).C:\
* Any string that looks like a Windows drive letter () will be replaced by a forward slash (/).
#### Build
This project bundles the yarn executable and the npm/yarn dependencies offline
in the .npm-packages-offline-cache directory for faster dependency installs
and better dev/prod parity across including preventing failure if yarn/npm is
offline.
`shInstall
npm run yarn