Skip to content

Move tests from Jest to Vitest for ESM compatibility #537

@graikhel-intel

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:

  • MPS
  • RPS
  • UI-Toolkit
  • UI-Toolkit Angular
  • UI-Toolkit React
  • Sample-Web-UI

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

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Status

    Q3 2026

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions