Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.