Skip to content

Commit

Permalink
feat: adding test for common mocking libraries (#266)
Browse files Browse the repository at this point in the history
* feat: adding test for common mocking libraries

* docs: updating the readme with info on mocking

* fix: node 18 compat
  • Loading branch information
erunion authored Apr 28, 2022
1 parent 209cb20 commit 1cdb0bf
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 4 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.github/
.nyc_output/
coverage/
test/
.eslint*
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Make a [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) reque
- Supports Node 14+ (including the native `fetch` implementation in Node 18!).
- Natively works in all browsers that support [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) without having to use any polyfils.
- [Tested](https://github.com/readmeio/fetch-har/actions) across Chrome, Safari, Firefox on Mac, Windows, and Linux.
- Requests can be mocked with [nock](https://npm.im/nock) or [fetch-mock](https://npm.im/fetch-mock).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = karmaConfig({
timeout: 15000,
},
},
exclude: ['test/node-quirks.test.ts'],
exclude: ['test/mocking/*.ts', 'test/node-quirks.test.ts'],
webpack: {
resolve: {
extensions: ['.js', '.ts'],
Expand Down
Loading

0 comments on commit 1cdb0bf

Please sign in to comment.