avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

Ability to run a mixed test code base using node:test #3271

Closed Raynos closed 11 months ago

Raynos commented 11 months ago

I want to migrate my tests and write new tests using node:test and continue using ava to run the entire test file.

Is it possible for ava cli to detect that a given file runs node:test and hook into that, or hook into the TAP output ?

Raynos commented 11 months ago

I briefly looked at a jscodeshift to go from ava to node:test but that's non-trivial, i was looking at the tape to ava codemod if i could inverse it.

novemberborn commented 11 months ago

The oldest AVA tests actually use the tap runner. We run separate sets of tests.

It would be possible within AVAs config to filter test files yourself, so you wouldn't provide globs but resolve the list of files fit for AVA.