std-env
std-env copied to clipboard
Add detection for tests runners ? (Jest, Vitest, Playwright, etc...)
Describe the feature
Most test framework sets a couple of env variables that we could use to detect them.
We could have a similar API here to the provider detection :
import { isTest, testRunner, testRunnerInfo } from "std-env";
console.log({
isCI, // true
provider, // "vitest"
providerInfo, // { name: "vitest", isTest: true, ...etc }
});
Additional information
- [X] Would you be willing to help implement this feature?