Skip to content

[Bug]: "Outdated snapshot: No snapshot header found." error on Windows with Jest v30.1.0 #15799

@martincostello

Description

@martincostello

Version

30.1.0

Steps to reproduce

  1. Clone martincostello/benchmarkdotnet-results-publisher@493a56c on Windows
  2. Run npm install
  3. Run npm test

Expected behavior

Tests pass.

Actual behavior

Tests fail:

 FAIL  tests/main.test.ts
  ● Test suite failed to run

    Outdated snapshot: No snapshot header found. Jest 19 introduced versioned snapshots to ensure all developers on a project are using the same version of Jest. Please update all snapshots during this upgrade of Jest.
    
    Warning: Before you upgrade snapshots, we recommend that you revert any local changes to tests or other code, to ensure that you do not store invalid state.

      at validateSnapshotHeader (node_modules/@jest/snapshot-utils/build/index.js:91:12)
      at getSnapshotData (node_modules/@jest/snapshot-utils/build/index.js:156:28)

Additional context

Likely caused by #15787.

Environment

Current runner version: '2.328.0'
Runner Image Provisioner
  Hosted Compute Agent
  Version: 20250812.370
  Commit: 4a2b2bf7520004e3e907c2150c8cabe342a3da32
  Build Date: 2025-08-12T16:08:14Z
Operating System
  Microsoft Windows Server 2022
  10.0.20348
  Datacenter
Runner Image
  Image: windows-2022
  Version: 20250817.1.0
  Included Software: https://github.com/actions/runner-images/blob/win22/20250817.1/images/windows/Windows2022-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20250817.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions