Skip to content

first local test run requires npm run build #222

@zeke

Description

@zeke

A fresh clone of this repo requires npm run build to be run before all the tests will pass. This is an easy thing to forget because you only have to run it once and then npm test continues to work without a fresh build.

One way we can work around this is by adding a pretest script to package.json with a value of npm run build. That way the build will always run first when anyone runs npm test.

That would solve the immediate problem for first-time contributors, but it would also incur a performance penalty every time you run the tests locally, as the build currently takes ~4 seconds to run on my superfast computer. Maybe 4s doesn't matter much in the grand scheme of things... but it would be nice to not incur that cost.

🤔 What are some ways we can solve this?

cc @github/docs-engineering @jeffmcaffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineeringWill involve Docs Engineeringgood first issueGood for newcomershelp wantedAnyone is welcome to open a pull request to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions