Skip to content

Commit

Permalink
docs: improved clarity around installation and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mhweiner committed Jun 26, 2024
1 parent 20ccad4 commit bd74dde
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 38 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ Named after [Sir Tony Hoare](https://en.wikipedia.org/wiki/Tony_Hoare), the inve
- Async/Await/Promise Support
- Simple API facilitates functional programming patterns and AI test generation.

[Read more on the inspiration, philosophy and attributions.](#inspiration-philosophy--attribution)

# Table of Contents

- [Examples](#examples)
Expand Down Expand Up @@ -72,7 +70,10 @@ test('should return "hello, world"', (assert) => {
assert.equal(helloworld(), 'hello, world');
});
```
## Valid Word

## Mocking Dependencies

You can use [cjs-mock](https://npmjs.org/cjs-mock) to mock dependencies (only works with CommonJS modules). This is especially useful for mocking file system operations, network requests, or other side effects.

_isValidWord.ts_
```typescript
Expand Down Expand Up @@ -110,7 +111,7 @@ test('invalid word returns false', async (assert) => {
});
```

See [demo](demo) or [src](src) directories for more examples.
### For more examples, see [examples](examples) or [src](src).

# Installation & Setup

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 0 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://github.com/mhweiner/hoare.git"
},
"scripts": {
"test": "npm run build && c8 ./bin/cli.js '@(demo|src)/**/*.spec.@(ts|js)' && c8 report -r text -r html",
"test": "npm run build && c8 ./bin/cli.js '@(examples|src)/**/*.spec.@(ts|js)' && c8 report -r text -r html",
"lint": "eslint ./ --ext .js,.ts",
"build": "rm -rf ./dist && tsc",
"semantic-release": "semantic-release"
Expand Down Expand Up @@ -55,7 +55,6 @@
"c8": "^7.10.0",
"cjs-mock": "^0.1.0",
"eslint": "^8.1.0",
"hoare": "^2.0.6",
"ts-node": "^10.9.2",
"typescript": "^5.5.2"
}
Expand Down

0 comments on commit bd74dde

Please sign in to comment.