Skip to content

Move tests from Jest to Vitest for ESM compatibility #537

Description

@graikhel-intel

Description

We need to move tests from Jest to Vitest for better ESM compatibility and to align with the current module setup used in these repos.

Some of these repos already use modern Node/TypeScript module settings (for example type: module and NodeNext). While Jest does support ESM, it often requires extra handling and configuration compared to Vitest.

This includes:

  • Adding a Vitest configuration with JUnit output and V8 coverage
  • Switching npm test to vitest run --coverage
  • Removing Jest configuration and Jest-related devDependencies
  • Updating GitHub Actions test reporting to parse Vitest JUnit output

This was already done in wsman-messages and can be used as a reference:
device-management-toolkit/wsman-messages#1214

We should do the same for the other repos that still depend on Jest.

Repos in scope:

Acceptance Criteria

  • Add Vitest configuration with JUnit output and V8 coverage.
  • Update npm test to use vitest run --coverage.
  • Remove Jest configuration and Jest-related devDependencies.
  • Update GitHub Actions test reporting to parse Vitest JUnit output.
  • Apply this change to the repos in scope.
  • Standard DoD

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status
In Progress
Status
Q3 2026 (Current)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions