Skip to content

Commit

Permalink
chore: use path compat with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayc0 committed Nov 16, 2023
1 parent e3a7c86 commit 15a46c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __tests__/diff-snapshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ describe('diff-snapshot', () => {
expect(onBeforeWriteToDisc).toHaveBeenCalledTimes(1);
expect(onBeforeWriteToDisc).toHaveBeenCalledWith({
buffer: mockImageBuffer,
destination: '/path/to/snapshots/id1.png',
destination: path.normalize('/path/to/snapshots/id1.png'),
testPath: 'test.spec.js',
currentTestName: 'test a',
});
Expand Down
6 changes: 3 additions & 3 deletions __tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ describe('toMatchImageSnapshot', () => {
snapshotIdentifier: 'test-spec-js-test-1-1-snap',
snapshotsDir: 'path/to/__image_snapshots__',
storeReceivedOnFailure: false,
testPath: 'path/to/test.spec.js',
testPath: path.normalize('path/to/test.spec.js'),
updatePassedSnapshot: false,
updateSnapshot: false,
});
Expand Down Expand Up @@ -523,7 +523,7 @@ describe('toMatchImageSnapshot', () => {
diffDir: path.join('path', 'to', 'my-custom-diff-dir'),
diffDirection: 'vertical',
onlyDiff: false,
testPath: 'path/to/test.spec.js',
testPath: path.join('path', 'to', 'test.spec.js'),
updateSnapshot: false,
updatePassedSnapshot: true,
failureThreshold: 1,
Expand Down Expand Up @@ -587,7 +587,7 @@ describe('toMatchImageSnapshot', () => {
diffDirection: 'horizontal',
onlyDiff: false,
storeReceivedOnFailure: true,
testPath: 'path/to/test.spec.js',
testPath: path.join('path', 'to', 'test.spec.js'),
updateSnapshot: false,
updatePassedSnapshot: false,
failureThreshold: 0,
Expand Down

0 comments on commit 15a46c7

Please sign in to comment.