Skip to content

ci(): vitest setup - #805

Merged
agviegas merged 1 commit into
ThatOpen:mainfrom
ShaMan123:ci/vitest
Sep 25, 2026
Merged

agviegas merged 1 commit into
ThatOpen:mainfrom
ShaMan123:ci/vitest

Conversation

@ShaMan123

@ShaMan123 ShaMan123 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR mirrors ThatOpen/engine_fragment#294 and acts as a prerequisit to #777

Changes: vitest/vite toolchain, config and setup file, jest removed.

@agviegas

Copy link
Copy Markdown
Contributor

Merged, with a few things added on top.

First, thanks for the shape: node as the default environment with a documented per-file opt-in is exactly what we asked for on the fragments side, and the setup file guarding the canvas mock and the worker shim behind a window check is the right call.

Three amendments. passWithNoTests is now on, since the first suites arrive in #777 and until then a tree with no test files should not fail the run. ./src/**/example.ts had to be repeated in the dts plugin's exclude: that option overrides tsconfig-build's exclude rather than adding to it, so the example files came back into the dts pass and reported TS2307 for their doc-only imports. We verified it as a control, removing the line brings the errors back and restoring it clears them. And there is a .gitattributes pinning snapshots to LF, so running the suite on Windows does not dirty them.

One thing we added because the PR title deserved it: the repo had no CI at all, so a ci() change added no gate in practice. There is now a workflow that installs with a frozen lockfile and runs build-core, build-front and the suite on every pull request and push to main.

One finding for later, not a blocker: the vite 7 bump makes the dts pass type-check packages/core/vite.config.ts, which now prints TS6133: 'fs' is declared but its value is never read on every core build. The import really is dead, only used in commented-out code, so it is a one-line cleanup whenever someone is nearby.

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.

2 participants