Skip to content

test: migrate core tests to vitest - #708

Merged
JoviDeCroock merged 1 commit into
preactjs:vitest-migrationfrom
43081j:vitest-core
Jul 5, 2025
Merged

test: migrate core tests to vitest#708
JoviDeCroock merged 1 commit into
preactjs:vitest-migrationfrom
43081j:vitest-core

Conversation

@43081j

@43081j 43081j commented Jun 28, 2025

Copy link
Copy Markdown
Contributor

Migrates the core package to use vitest.

just noticed we won't get CI for these branches 😬 not sure i want to have to change the workflow triggers though 🤔

depends on #713

@changeset-bot

changeset-bot Bot commented Jun 29, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 91e5b60

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@43081j
43081j force-pushed the vitest-core branch 2 times, most recently from 5c7520e to 039b755 Compare June 29, 2025 21:37

@JoviDeCroock JoviDeCroock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just add it temp if you like

@43081j

43081j commented Jun 30, 2025

Copy link
Copy Markdown
Contributor Author

that'd be helpful i think, and can drop it in the overall merge

@JoviDeCroock

Copy link
Copy Markdown
Member

CI should run after rebasing

Migrates the core package to use vitest.
@JoviDeCroock
JoviDeCroock merged commit 2830b0e into preactjs:vitest-migration Jul 5, 2025
1 check passed
@43081j
43081j deleted the vitest-core branch July 5, 2025 08:47
JoviDeCroock pushed a commit that referenced this pull request Oct 29, 2025
Migrates the core package to use vitest.
JoviDeCroock pushed a commit that referenced this pull request Jan 9, 2026
Migrates the core package to use vitest.
JoviDeCroock added a commit that referenced this pull request Jan 14, 2026
* test: add vitest prep (#707)

Adds vitest and associated scripts which will not succeed yet, as we
have no projects.

* fix: move to using a root vitest config (#713)

We were quickly going to end up with too many sub-configs, and all sorts
of problems with extending the various configs.

This switches to a single root config which globs each of the monorepo
packages instead.

* test: migrate preact/utils to vitest (#715)

* test: migrate preact/utils to vitest

This also adds `preact/utils` to the pnpm workspace so it can be
resolved properly via `@preact/signals-utils`.

* chore: revert workspace change

* fix: downgrade to vite 6 and revert the revert

* test: migrate signals package to vitest (#710)

Migrates the signals package to use vitest browser tests.

* test: migrate core tests to vitest (#708)

Migrates the core package to use vitest.

* test: migrate react tests to vitest (#716)

* test: migrate react tests to vitest

* test: migrate react-transform to vitest

* chore: remove mocha/sinon/chai/karma

* fix: add exact import

* fix: strongly type mocked components

* test: add the sketchy transform back

* fix: funky runtime path

* fix: resolve signals after runtime

* test: map things to places

* test: use vitest aliases

THIS MAY ACTUALLY WORK!

* chore: use react 16 in runtime too

* test: use correct vitest coverage globs (#779)

* chore: remove unused karma config

* test: correct coverage globs

* Fix some stragglers

* Move to browser

* test: de-dupe dependencies & use CDP GC (#786)

* chore: de-dupe babel dependencies

In the lockfile, we ended up with two versions of babel. This is
basically de-duping and dropping one of them.

* fix: use vitest assertions

* fix: dedupe vite

* test: use cdp to force garbage collection

---------

Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
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