Skip to content

Precommit hook fails when no related tests are found #1020

@ekh64

Description

@ekh64

I have a commit that updates a dependency and a single jest.config.js file. Because this is a js file, the following gets run and subsequently fails

$ jest --config jest.config.js --bail --findRelatedTests
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0

I propose adding --passWithNoTests to the test stage in the pre-commit hooks to account for no related test files in a commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions