Catalog npm
PACKAGE EXPLORERView in registry

10mock

npm

Mid testing mock server for client-side testing.

apimocknockreact-nativeresttest
Versions collected16
Direct dependencies13From release 1.0.15
Last observed20 Oct, 18:01 UTC

README

Current package documentation

10mock

mockserver is a lightweight library that will help you mock your APIs requests fast and easy.

Installation

10mock can be installed globally :

npm install -g 10mock

10mock -p 8080
[10mock]: Server is running at http://localhost:8080

or as a regular NPM module:

npm install -D 10mock
npx 10mock

[10mock]: Server is running at http://localhost:8000

Available options:

  1. -p <port> run the mock server on the specified port, default port is 8000.
  2. -x <server url> run the mock server as proxy server

10mock also supplies easy to use client:

import Api from '10mock';
export const api = new Api(optional-port);

10mock server client usage:

  1. api.finishTest() - remove all mocked routes.
  2. api.nock(path).method(method).status(status).send(mocked-response);
  • Create new mocked route → returns object with these entities:
    • getCount → function thats returns the number of requests sent to this route.
    • getStubRequests → function thats returns all the requests sent to this route.
    • getStats → function thats returns getStubRequests and getCount results.
    • deleteRoute → function thats remove this mocked route.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 16

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.15Registry latest27 May 202113
1.0.1427 May 202113
1.0.1327 May 202113
1.0.1227 May 202113
1.0.1126 May 202112
1.0.1026 May 202112
1.0.926 May 202112
1.0.826 May 202112
1.0.726 May 202112
1.0.626 May 202112
1.0.526 May 202112
1.0.48 Mar 202111
1.0.38 Mar 202111
1.0.28 Mar 202111
1.0.127 Jan 202111
1.0.027 Jan 202111

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
10play/10mock

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7745ff1c9221be46d17b3ddef7ed8429e95813573f8775ad6da865c89f81810f