Skip to content

Commit

Permalink
GH-240 update CONTRIBUTING where command does not work and add additi…
Browse files Browse the repository at this point in the history
…onal helper scripts
  • Loading branch information
larmitage-bjss authored and npalm committed Feb 14, 2024
1 parent ed32ac5 commit 1d85422
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu

2. Install dependencies `yarn install`

3. See the `package.json` how to run the test.
3. Run `yarn run` to see the scripts available e.g. `yarn run all` to build, lint and test

4. Run the CLI locally

```bash
yarn run dev src/cli.ts <options>
node lib/cli.js <options>
```

### Adding tests
Expand Down
2 changes: 1 addition & 1 deletion __tests__/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("CLI tests", () => {

test("Console output with TOC 3 and no banner.", async () => {
const result = await cli(
`-a __tests__/fixtures/all_fields_action.yml -t 3 --no-banner`,
`-a ${path.join(fixtureDir, "all_fields_action.yml")} -t 3 --no-banner`,
);

const expected = <string>(
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"test": "yarn run test-default && yarn run test-cli",
"test-default": "jest --testTimeout=10000 --testPathIgnorePatterns=__tests__/cli.test.ts --collect-coverage --coverage",
"test-cli": "nyc jest --testTimeout=10000 --silent --testMatch=**/cli*test.ts && nyc report --reporter=lcov --reporter=html --report-dir=./coverage_nyc",
"test-action": "nyc jest --testTimeout=10000 --silent --testMatch=**/action-docs.test.ts --coverage=false",
"dev-action": "node lib/cli.js -a __tests__/fixtures/action.yml",
"all": "yarn run build && yarn run format && yarn run lint && yarn test"
},
"repository": {
Expand Down

0 comments on commit 1d85422

Please sign in to comment.