Skip to content

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

Closed
ramzimalhas/standard-sdk-js-comake
#3
@olets

Description

@olets

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions