snyk / policy

Snyk policy parser and matching logic
Other
8 stars 8 forks source link

chore: switch to vitest #107

Closed gclapperton closed 1 year ago

gclapperton commented 1 year ago

What does this PR do?

Switches from TAP to vitest and replaces sinon for vitest mocking

TAP was simply way too slow clocking in at around 28 sec (see below), whereas vitest runs in just over 5 sec for the full suite. vitest also has much better editor integration (last image) with seamless debugging

Note: the way that tests are aggregated does differ, but all tests have been ported

How should this be manually tested?

npm run test

Screenshots

Old, slow test run with TAP 🐢

image

New, fast test run with vitest! 🚀

image

Editor integration

image
snyksec commented 1 year ago

:tada: This PR is included in version 2.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: