Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jameslnewell/xhr-mock
Utility for mocking XMLHttpRequest.
https://github.com/jameslnewell/xhr-mock
javascript mock mock-responses xhr xmlhttprequest
Last synced: 7 days 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-18T12:35:05.000Z (over 2 years ago)
- Last Synced: 2024-11-21T14:10:48.437Z (23 days ago)
- Topics: javascript, mock, mock-responses, xhr, xmlhttprequest
- Language: TypeScript
- Homepage:
- Size: 1.63 MB
- Stars: 197
- Watchers: 5
- 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.