1.0.2 • Published 2 years ago

msw-devtools v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

msw-devtools

NPM

Devtools for exploring and testing mocked API handlers and data built with msw.

Useful when developing applications using "API first" approach where you mock the API before building the UI.

MSW API handlers testing:

demo

MSW Data inspection:

demo

Installation

NPM

$ npm install msw-devtools

Yarn:

$ yarn add msw-devtools

Usage

import { MSWDevTools } from 'msw-devtools';
import { db, handlers } from '../test/mocks';

export function App({ children }) {
  return (
    <>
      <MSWDevTools db={db} handlers={handlers} />
      Hello World
    </>
  );
}

API

MSWDevTools

import { FactoryAPI } from '@mswjs/data/lib/glossary';
import { RestHandler } from 'msw';

export type MSWDevToolsProps = {
  db?: FactoryAPI<any>;
  handlers?: RestHandler[];
};

Contributing

  1. Clone this repo
  2. Create a branch: git checkout -b your-feature
  3. Make some changes
  4. Test your changes
  5. Push your branch and open a Pull Request

LICENSE

MIT

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago