Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/braces-3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
code-forger committed Jan 9, 2025
2 parents f64192e + ff77394 commit 8f1a436
Show file tree
Hide file tree
Showing 10 changed files with 10,993 additions and 10,682 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
tests:
strategy:
matrix:
node: [ '14.x', '16.x', '18.x' ]
node: [ '18.x', '20.x', '22.x' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} - ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
tests:
strategy:
matrix:
node: [ '14.x', '16.x', '18.x' ]
node: [ '18.x', '20.x', '22.x' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} - ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions __tests__/integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

const fs = require('fs');
const path = require('path');
const rimraf = require('rimraf');
const { rimrafSync } = require('rimraf');
const uniqueId = require('lodash/uniqueId');
const sizeOf = require('image-size');
const { SnapshotState } = require('jest-snapshot');
Expand All @@ -37,11 +37,11 @@ describe('toMatchImageSnapshot', () => {
});

beforeEach(() => {
rimraf.sync(`**/${cleanupRequiredIndicator}*`);
rimrafSync(`**/${cleanupRequiredIndicator}*`, { glob: true });
});

afterAll(() => {
rimraf.sync(`**/${cleanupRequiredIndicator}*`);
rimrafSync(`**/${cleanupRequiredIndicator}*`, { glob: true });
});

describe('happy path', () => {
Expand Down Expand Up @@ -312,7 +312,7 @@ describe('toMatchImageSnapshot', () => {
expect(fs.existsSync(pathToResultImage))
.toBe(true);

expect(fs.readFileSync(pathToResultImage)).toEqual(largeImageFailureDiffData);
expect(fs.readFileSync(pathToResultImage)).toMatchImageSnapshot(largeImageFailureDiffData);
// just because file was written does not mean it is a png image
expect(sizeOf(pathToResultImage))
.toHaveProperty('type', 'png');
Expand Down
4 changes: 2 additions & 2 deletions __tests__/outdated-snapshot-reporter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const fs = require('fs');
const os = require('os');
const childProcess = require('child_process');
const path = require('path');
const rimraf = require('rimraf');

describe('OutdatedSnapshotReporter', () => {
const jestImageSnapshotDir = path.join(__dirname, '..');
Expand Down Expand Up @@ -61,6 +60,7 @@ describe('OutdatedSnapshotReporter', () => {
cwd: tmpDir,
encoding: 'utf-8',
env: { ...process.env, ...environment },
shell: true,
});
if (child.error) throw child.error;

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

afterAll(() => {
rimraf.sync(tmpDir);
fs.rmSync(tmpDir, { recursive: true, force: true });
});

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

0 comments on commit 8f1a436

Please sign in to comment.