# ionic-protractor-mock

> Request mock plugin for Ionic

Latest version **1.2.0** (published 2017-09-09) · 0 weekly downloads

## Install

```sh
npm install ionic-protractor-mock
pnpm add ionic-protractor-mock
yarn add ionic-protractor-mock
bun add ionic-protractor-mock
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-09-09 |
| First published | 2017-09-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Carles |
| Maintainers | cnpallares |

## Links

- npm: https://www.npmjs.com/package/ionic-protractor-mock
- Repository: https://github.com/cnpallares/protractor-xmlhttprequest-mock
- Homepage: https://github.com/cnpallares/protractor-xmlhttprequest-mock#readme
- Issues: https://github.com/cnpallares/protractor-xmlhttprequest-mock/issues
- npm.io page: https://npm.io/package/ionic-protractor-mock

## Recent versions

- 1.2.0 (latest) — 2017-09-09
- 1.1.0 — 2017-09-09
- 1.0.0 — 2017-09-09

## README

# ionic-protractor-mock
Request mock plugin for Ionic.

A simple example of usage:

```ts
import {browser, $} from 'protractor';
import {MockService} from 'ionic-protractor-mock';

describe('the backend', () => {
  it('should reply with code 418', () => {
    MockService.setup(browser);
    MockService.addMock('mock1', {
      path: '/api/teapot',
      response: {status: 418, data: "I'm a teapot"},
    });

    $('button').click();
    expect($('div').getText()).toEqual("I'm a teapot");
  });
});
```

---
_Source: https://npm.io/package/ionic-protractor-mock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
