Uh oh!
There was an error while loading. Please reload this page.
Convert test framework from Mocha/Chai to Vitest and update CI workflows - #35
Conversation
Co-authored-by: dgreif <3026298+dgreif@users.noreply.github.com>
Co-authored-by: dgreif <3026298+dgreif@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: dgreif <3026298+dgreif@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the testing infrastructure from Mocha/Chai to Vitest v3.2.4 and updates CI workflows to use Node.js 24.
- Replaces Mocha/Chai test framework with Vitest for modern TypeScript testing
- Updates Node.js version to 24 in GitHub Actions workflows
- Removes outdated dependencies and configurations while adding Playwright support
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Adds Vitest configuration for TypeScript test execution |
| test/index.ts | Converts Chai assertions to Vitest syntax and spy functions |
| test/decorator.ts | Updates test assertions from Chai to Vitest format |
| package.json | Removes Mocha/Chai dependencies, adds Vitest, updates TypeScript and Node types |
| .github/workflows/publish.yml | Updates Node.js to v24 and adds Playwright installation |
| .github/workflows/nodejs.yml | Updates Node.js to v24 and adds Playwright installation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| with: | ||
| node-version: 22 | ||
| node-version: 24 | ||
| - run: npx playwright install chromium |
There was a problem hiding this comment.
@copilot we actually don't need playwright since we aren't using browser mode. Remove all installs in ci
There was a problem hiding this comment.
Removed playwright install steps from both nodejs.yml and publish.yml workflows. (commit: will be included in next push)
Co-authored-by: dgreif <3026298+dgreif@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
This PR modernizes the testing infrastructure by migrating from Mocha/Chai to Vitest v3.2.4, and updates GitHub Actions workflows to use the latest Node.js versions.
Test Framework Migration
Removed dependencies:
mocha,chai,chai-spies,ts-nodeand related@typespackagesAdded:
vitest@^3.2.4with proper TypeScript supportTest files updated:
All test files (
test/index.ts,test/decorator.ts) have been converted from Chai assertions to Vitest:Configuration changes:
vitest.config.tsfor Vitest configurationnode --loader ts-node/esm.mjs node_modules/mocha/lib/cli/cli.jstovitest runpackage.jsonDependency Updates
typescriptfrom^4.6.4to^5.9.3for better compatibility@types/nodefrom^14.0.19to^22.18.8to match Node.js 24 requirementsskipLibCheck: truetotsconfig.jsonto handle type definitions in node_modulesGitHub Actions Workflows
nodejs.yml:
publish.yml:
Both workflows already used the latest versions of
actions/checkout@v4andactions/setup-node@v4.Validation
All existing tests pass successfully:
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.