Skip to content

Fix snapshot tests on Windows - #398

Merged
GarboMuffin merged 2 commits into
developfrom
windows-snapshots
Oct 31, 2026
Merged

GarboMuffin merged 2 commits into
developfrom
windows-snapshots

Conversation

@GarboMuffin

Copy link
Copy Markdown
Member
  • always check out snapshots with LF line endings
  • fix snapshot assertion having backwards order, resulting in confusing errors

@GarboMuffin GarboMuffin linked an issue Oct 31, 2026 that may be closed by this pull request
@GarboMuffin
GarboMuffin merged commit c985ca5 into develop Oct 31, 2026
2 checks passed
@GarboMuffin
GarboMuffin deleted the windows-snapshots branch October 31, 2026 14:54
Mistium added a commit to MistWarp/scratch-vm that referenced this pull request Nov 1, 2026
)

* Replace tap with node:test

Port TurboWarp#393 (7387fa0) and TurboWarp#398 (c985ca5): the unit
and integration suites run on Node's built-in node:test and node:assert
instead of tap.

- 171 test files are taken verbatim from upstream, and 3 more drop only
  the comments upstream added.
- 34 files that MistWarp had changed are merged with upstream's
  conversion, and their MistWarp-only tests are converted in the same
  style.
- 60 MistWarp-only test files are converted in the same style.
- npm test runs lint and test:node. test:unit and test:integration run
  one half. The tap scripts, tap config and coverage script are gone, and
  tap and @types/tap are removed from devDependencies.
- CI runs npm run test:node. Snapshots are checked out with LF endings.

Assertions that tap recorded inside callbacks the VM wraps in try/catch
(project metadata handlers, COMPILE_ERROR listeners, denied extension
loads) now collect their values and assert after the call, so a failure
cannot be swallowed. Where a test relied on t.same ignoring prototypes or
types, it uses assert.deepEqual to keep the same meaning.

* Fail tests on async work after they end, and assert the compiled list type exactly

Drop --test-force-exit so a test that leaves a failing promise or timer behind
fails the run instead of exiting 0. The cached compile test now asserts the
number the compiler stores rather than a loose string match. Remove two dead
continue lines, a sentence that introduced the moved keyword list, and a
trailing blank line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snapshot test fails on Windows

1 participant