copilot-extensions / preview-sdk.js

An SDK that streamlines extension development by automating request verification, response formatting, and API interactions
MIT License
19 stars 15 forks source link

Use `ava` and `c8` for testing and coverage #73

Closed gr2m closed 1 month ago

gr2m commented 1 month ago

We currently use only node-native APIs for testing, including coverage and snapshotting. It's very convenient and super fast, I'm glad these APIs are being added. But it means we cannot test in Node 20, which is the current LTS version and will be on maintenance for a long time.

Eventually we will have to use a library, as convenient as it is to use Node-native APIs only.

For ESM projects, I made great experiences with https://github.com/avajs/ava. It has all the features we need. For test coverage, https://github.com/bcoe/c8 is the module to use

See https://github.com/gr2m/github-project/ as a reference project where I use both.

francisfuzz commented 1 month ago

👋 Hi! I proposed #78 to use ava for testing if it gets the conversation going?

(I think landing c8 in its own pull request would be the way to go 😉 )

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 5.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: