network-barrier

0.0.4 • Public • Published

Motivation

network-barrier blocks HTTP Requests at network level and helps you choose what you want to simulate to have as HTTP Response. It is handy when doing tests that:

  • Check API contracts
  • To be sure that after an specific json response, your UI is gonna be rendered as you expect.

Under the hood, it intercepts the HTTP requests by using the javascript's Proxy and lets you do it by exposing a semantic API.

Getting started

network-barrier is under construction. 🏗 So, please, check the tests as documentation until there's a proper README file.

Don't forget to reset the network simulation between tests like you can do by using a jest.config.js file.

For now, it only works for HTTP Requests using fetch.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    0
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i network-barrier

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

20.8 kB

Total Files

8

Last publish

Collaborators

  • perizote