Skip to content

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

@IonianPlayboy

Description

@IonianPlayboy

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

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions