File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/jest-snapshot-utils/src Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
## main
2
2
3
+ ### Fixes
4
+
5
+ - ` [jest-snapshot-utils] ` Correct snapshot header regexp to work with newline across OSes ([ #15803 ] ( https://github.com/jestjs/jest/pull/15803 ) )
6
+
3
7
## 30.1.1
4
8
5
9
### Fixes
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import type {Config} from '@jest/types';
13
13
import type { SnapshotData } from './types' ;
14
14
15
15
export const SNAPSHOT_VERSION = '1' ;
16
- const SNAPSHOT_HEADER_REGEXP = / ^ \/ \/ J e s t S n a p s h o t v ( .+ ) , ( .+ ) \r ? \n / ;
16
+ const SNAPSHOT_HEADER_REGEXP = / ^ \/ \/ J e s t S n a p s h o t v ( .+ ) , ( .+ ) $ / m ;
17
17
export const SNAPSHOT_GUIDE_LINK = 'https://jestjs.io/docs/snapshot-testing' ;
18
18
export const SNAPSHOT_VERSION_WARNING = chalk . yellow (
19
19
`${ chalk . bold ( 'Warning' ) } : Before you upgrade snapshots, ` +
You can’t perform that action at this time.
0 commit comments