[Bug]: Snapshot testing does not detect the difference between CR ("\r") and LF ("\n") #15204
Open
Description
Version
29.7.0 and 30.0.0-alpha.5
Steps to reproduce
- https://github.com/latin-1/jest-cr-snapshot-bugs
npm install
npx jest -u b.spec.js
CI=true USE_CR=true npx jest b.spec.js
Expected behavior
It should fail because of the difference between CR and LF.
Actual behavior
The test passed.
Additional context
No response
Environment
System:
OS: Linux 6.9 Arch Linux
CPU: (16) x64 AMD Ryzen 7 6800U with Radeon Graphics
Binaries:
Node: 22.5.1 - ~/.proto/shims/node
Yarn: 4.3.1 - ~/.proto/shims/yarn
npm: 10.8.2 - ~/.proto/shims/npm
pnpm: 9.5.0 - ~/.proto/shims/pnpm
bun: 1.1.20 - ~/.proto/shims/bun
npmPackages:
jest: 29.7.0 => 29.7.0