std-env icon indicating copy to clipboard operation
std-env copied to clipboard

Add detection for tests runners ? (Jest, Vitest, Playwright, etc...)

Open IonianPlayboy opened this issue 1 year ago • 0 comments

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?

IonianPlayboy avatar Mar 18 '24 13:03 IonianPlayboy