https://github.com/jameslnewell/xhr-mock
Utility for mocking XMLHttpRequest.
https://github.com/jameslnewell/xhr-mock
javascript mock mock-responses xhr xmlhttprequest
Last synced: about 1 year ago
JSON representation
Utility for mocking XMLHttpRequest.
- Host: GitHub
- URL: https://github.com/jameslnewell/xhr-mock
- Owner: jameslnewell
- Created: 2014-12-24T02:51:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-03-18T12:35:05.000Z (over 4 years ago)
- Last Synced: 2025-04-08T08:13:46.427Z (over 1 year ago)
- Topics: javascript, mock, mock-responses, xhr, xmlhttprequest
- Language: TypeScript
- Homepage:
- Size: 1.63 MB
- Stars: 197
- Watchers: 4
- Forks: 48
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xhr-mock
This repo is a mono-repo managed by `lernajs`.
## [📖 Documentation](./packages/xhr-mock)
The documentation for the main NPM package can be found [here](./packages/xhr-mock).
## 🛠 Development
Install the dependencies:
```bash
yarn
yarn run bootstrap
```
### The NPM package
Build and test the package:
```bash
cd packages/xhr-mock
yarn run build # transpile the sources
yarn run test # run the unit tests
```
### The integration tests
Test the package against a few well known XHR libraries:
```bash
# NOTE: you need to build the main package first
cd packages/xhr-mock-tests
yarn run test # run the integration tests
```
## 🎁 Contributing
Contributors are very welcome! Please raise an issue or PR on Github.