Skip to content

Conversation

@Kailai-Wang
Copy link
Collaborator

Context

As topic - for more friendly and modern ESM support

- Replace Mocha + Chai + mocha-steps with Vitest
- Update package.json: remove mocha/chai deps, add vitest
- Add vitest.config.ts with test configuration
- Convert test syntax:
  * step() → test()
  * expect().to.equal() → expect().toBe()
  * describeLitentry now uses Vitest hooks (beforeAll/afterAll)
- Update all imports to use .js extensions for ESM compatibility
- Update package.json to use 'type: module'
- Test scripts remain same (test-filter, test-evm-contract, etc.)
- No changes to CI or bash scripts needed (they call pnpm scripts)

Benefits:
- Native ESM support (no more ts-node/register hacks)
- Better TypeScript integration
- Faster test execution
- Modern test framework with better DX
- Update @vitest/ui: 3.0.0 → 3.2.4
- Update vitest: 3.0.0 → 3.2.4
- Refresh pnpm-lock.yaml with latest resolved versions
@Kailai-Wang Kailai-Wang requested a review from a team November 20, 2025 21:00
@Kailai-Wang Kailai-Wang self-assigned this Nov 20, 2025
@linear
Copy link

linear bot commented Nov 20, 2025

@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
heima-aa-demo-app Ignored Ignored Nov 23, 2025 7:54pm

@BillyWooo BillyWooo enabled auto-merge (squash) November 23, 2025 20:12
@BillyWooo BillyWooo merged commit 5f1f4b0 into dev Nov 23, 2025
16 checks passed
@BillyWooo BillyWooo deleted the p-1728-vitest-migration branch November 23, 2025 20:14
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.

3 participants