nylas-nodejs icon indicating copy to clipboard operation
nylas-nodejs copied to clipboard

Migrate tests to vitest and configure miniflare integration

Open AaronDDM opened this issue 3 months ago • 3 comments

This PR migrates the test suite from Jest to Vitest and integrates Cloudflare Workers (Miniflare) testing into the CI pipeline.

Key Changes:

  • Replaced Jest with Vitest: All Jest dependencies and configurations have been removed, and Vitest is now the primary test runner.
  • Dual Test Environments: Configured Vitest to run tests in two environments:
    • Standard Node.js (for existing SDK tests).
    • Cloudflare Workers (using Miniflare via @cloudflare/vitest-pool-workers) to ensure compatibility with Workers environments.
  • GitHub Actions Update: The pull-request.yml workflow now runs tests for both Node.js and Cloudflare Workers, ensuring comprehensive coverage across target platforms.
  • Test File Conversion: All existing test files have been converted from Jest syntax to Vitest's equivalent APIs.

This change modernizes the testing infrastructure and expands test coverage to critical Cloudflare Workers environments.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.


Open in Cursor Open in Web

AaronDDM avatar Oct 01 '25 04:10 AaronDDM