Skip to content

Commit f35e43e

Browse files
committed
Merge branch 'main' into dependabot/npm_and_yarn/braces-3.0.3
2 parents f64192e + ff77394 commit f35e43e

10 files changed

+11622
-10062
lines changed

.github/workflows/health-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
tests:
1010
strategy:
1111
matrix:
12-
node: [ '14.x', '16.x', '18.x' ]
12+
node: [ '18.x', '20.x', '22.x' ]
1313
os: [ ubuntu-latest, windows-latest, macos-latest ]
1414
runs-on: ${{ matrix.os }}
1515
name: Node ${{ matrix.node }} - ${{ matrix.os }}

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
tests:
1010
strategy:
1111
matrix:
12-
node: [ '14.x', '16.x', '18.x' ]
12+
node: [ '18.x', '20.x', '22.x' ]
1313
os: [ ubuntu-latest, windows-latest, macos-latest ]
1414
runs-on: ${{ matrix.os }}
1515
name: Node ${{ matrix.node }} - ${{ matrix.os }}

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
20
Binary file not shown.

__tests__/integration.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
const fs = require('fs');
1616
const path = require('path');
17-
const rimraf = require('rimraf');
17+
const { rimrafSync } = require('rimraf');
1818
const uniqueId = require('lodash/uniqueId');
1919
const sizeOf = require('image-size');
2020
const { SnapshotState } = require('jest-snapshot');
@@ -37,11 +37,11 @@ describe('toMatchImageSnapshot', () => {
3737
});
3838

3939
beforeEach(() => {
40-
rimraf.sync(`**/${cleanupRequiredIndicator}*`);
40+
rimrafSync(`**/${cleanupRequiredIndicator}*`, { glob: true });
4141
});
4242

4343
afterAll(() => {
44-
rimraf.sync(`**/${cleanupRequiredIndicator}*`);
44+
rimrafSync(`**/${cleanupRequiredIndicator}*`, { glob: true });
4545
});
4646

4747
describe('happy path', () => {
@@ -312,7 +312,7 @@ describe('toMatchImageSnapshot', () => {
312312
expect(fs.existsSync(pathToResultImage))
313313
.toBe(true);
314314

315-
expect(fs.readFileSync(pathToResultImage)).toEqual(largeImageFailureDiffData);
315+
expect(fs.readFileSync(pathToResultImage)).toMatchImageSnapshot(largeImageFailureDiffData);
316316
// just because file was written does not mean it is a png image
317317
expect(sizeOf(pathToResultImage))
318318
.toHaveProperty('type', 'png');

__tests__/outdated-snapshot-reporter.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const fs = require('fs');
1616
const os = require('os');
1717
const childProcess = require('child_process');
1818
const path = require('path');
19-
const rimraf = require('rimraf');
2019

2120
describe('OutdatedSnapshotReporter', () => {
2221
const jestImageSnapshotDir = path.join(__dirname, '..');
@@ -61,6 +60,7 @@ describe('OutdatedSnapshotReporter', () => {
6160
cwd: tmpDir,
6261
encoding: 'utf-8',
6362
env: { ...process.env, ...environment },
63+
shell: true,
6464
});
6565
if (child.error) throw child.error;
6666

@@ -79,7 +79,7 @@ describe('OutdatedSnapshotReporter', () => {
7979
});
8080

8181
afterAll(() => {
82-
rimraf.sync(tmpDir);
82+
fs.rmSync(tmpDir, { recursive: true, force: true });
8383
});
8484

8585
it('should write the image snapshot on first run', () => {

0 commit comments

Comments
 (0)