Skip to content

fix: document a low-friction way to run tests to satisfy PR template checklist item #3639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks
olets opened this issue Aug 9, 2023 · 1 comment · May be fixed by ramzimalhas/standard-sdk-js-comake#3
Closed
4 tasks

Comments

@olets
Copy link
Contributor

olets commented Aug 9, 2023

Expected Behavior

There's a low-friction path to satisfying the pull request template's "All new and existing tests passed." checklist item.

Current Behavior

  • Testing is not documented in either ./README.md or docs/README.md.
  • Dev has to know to know that the presence of yarn.lock means dependencies should be installed with yarn
  • yarn test in the root directory errors
    yarn test 
    yarn run v1.22.19
    $ cross-env HOME=$PWD jest
    ● Validation Error:
    
      Test environment @commitlint/test-environment cannot be found. Make sure the testEnvironment configuration option points to an existing node module.
    
      Configuration Documentation:
      https://jestjs.io/docs/configuration
    
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I haven't experimented. The ignoreDeps looks relevant. Or maybe tests have to be run manually in each package in ./@commitlint?

Steps to Reproduce

# if not starting from a fresh clone, first `rm -rf node_modules`
yarn
yarn test

Context

Opening a docs change pull request, got to the "All new and existing tests passed." checklist item, and for completeness tried to run the tests.

commitlint --version

17.7.0

git --version

2.41.0

node --version

v18.16.0

@escapedcat
Copy link
Member

Testing is somewhat documented in this part pf the docs. Happy for improvements of the docs though.

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

Successfully merging a pull request may close this issue.

2 participants