vitest-dev / vitest

Next generation testing framework powered by Vite.
https://vitest.dev
MIT License
12.98k stars 1.16k forks source link

Custom test runner #1470

Closed black7375 closed 1 year ago

black7375 commented 2 years ago

Clear and concise description of the problem

Jest ecosystem has jest-runner or create-jest-runner.

It can be extended to test in an environment such as an electron. Also, It would be nice to be able to perform lint or typecheck with the efficient worker of tinypool.

Suggested solution

I'd like to provide an API for setting up a custom runner.

Alternative

It can also refer to Jest's projects config.

Additional context

No response

Validations

sheremet-va commented 2 years ago

I'd like to provide an API for setting up a custom runner.

Ready to hear it 😄

Right now we run our tests in packages/vitest/src/runtime/run.ts. You can look it up for reference

acutmore commented 2 years ago

Some more info here on Jest's custom test runner: https://www.youtube.com/watch?v=NtjyeojAOBs "ReactiveConf 2017 - Rogelio Guzman: Jest as a Platform"