Skip to content

consistently name (and rename) test files #2383

Closed

Description

We should rename test files in test/**/*.js to test/**/*.spec.js. This would help with quickly opening files in an IDE or text editor. I often open the wrong runnable.js:

image

Renaming the test files will eliminate potential confusion here and improve DX.

However, not everything in the glob test/**/*.js is a test.

Fixtures (e.g. test/integration/fixtures/**/*.js and others) should not be renamed to *.spec.js. Ideally we could settle on a convention (*.fixture.js?) and eliminate the weirdo filenames with umpteen extensions; multiple.done.before.js could be multiple-done-before.fixture.js, for example.

Mostly I'm looking for consistency in recognizing that I'm about to open a source file, a test file, a fixture, or whatever else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    nice to haveenhancement proposal of low prioritytype: choregenerally involving deps, tooling, configuration, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions