Skip to content

Commit 991458d

Browse files
committed
fix lint issues
1 parent c297f1d commit 991458d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

__tests__/snapshotDiff.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ test('can use contextLines with React components', () => {
200200
});
201201

202202
test('can use stablePatchmarks on diff', () => {
203-
expect(snapshotDiff(noIndentA, noIndentB, { stablePatchmarks: true })).toMatchSnapshot();
203+
expect(
204+
snapshotDiff(noIndentA, noIndentB, { stablePatchmarks: true })
205+
).toMatchSnapshot();
204206
});
205207

206208
describe('failed optional deps', () => {

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ const snapshotDiff = (valueA: any, valueB: any, options?: Options): string => {
4545
}
4646

4747
if (mergedOptions.stablePatchmarks && !mergedOptions.expand) {
48-
difference = difference.replace(/^@@ -[0-9]+,[0-9]+ \+[0-9]+,[0-9]+ @@$/gm, '@@ --- --- @@')
48+
difference = difference.replace(
49+
/^@@ -[0-9]+,[0-9]+ \+[0-9]+,[0-9]+ @@$/gm,
50+
'@@ --- --- @@'
51+
);
4952
}
5053

5154
return SNAPSHOT_TITLE + difference;

0 commit comments

Comments
 (0)