Skip to content

Commit

Permalink
(refactor) remove module: prefix from doclets, finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
f3rno authored and JacobPlaster committed Jun 9, 2020
1 parent 4ba5b6e commit 4e3440a
Show file tree
Hide file tree
Showing 7 changed files with 276 additions and 315 deletions.
562 changes: 269 additions & 293 deletions docs/reference.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const MockRESTv2Server = require('./lib/rest2')

/**
* This module hosts mock servers for the
* {@link module:bfx-api-mock-srv.MockWSv2Server|WSv2} and
* {@link module:bfx-api-mock-srv.MockRESTv2Server|RESTv2} Bitfinex APIs, and
* is intended for testing the Bitfinex API libraries.
* {@link MockWSv2Server|WSv2} and {@link MockRESTv2Server|RESTv2} Bitfinex
* APIs, and is intended for testing the Bitfinex API libraries.
*
* @license Apache-2.0
* @module bfx-api-mock-srv
Expand Down
3 changes: 1 addition & 2 deletions lib/rest2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const RESTV2_MOCK_METHODS = require('./methods')
* for a different symbol (`tETHUSD`) would return `[41]`.
*
* @class
* @memberof module:bfx-api-mock-srv
* @augments module:bfx-api-mock-srv.MockServer
* @augments MockServer
*/
class MockRESTv2Server extends MockServer {
/**
Expand Down
1 change: 0 additions & 1 deletion lib/rest2/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/**
* RESTv2 mock server method definition
*
* @memberof module:bfx-api-mock-srv
* @constant
* @readonly
* @private
Expand Down
6 changes: 1 addition & 5 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ const debug = require('debug')('bfx:api-mock-srv:server')
* Mock server base class, listens for commands to get/set responses
*
* @class
* @memberof module:bfx-api-mock-srv
* @augments EventEmitter
*
* @see {@link module:bfx-api-mock-srv.MockRESTv2Server|MockRESTv2Server}
* @see {@link module:bfx-api-mock-srv.MockWSv2Server|MockWSv2Server}
* @augments events.EventEmitter
*/
class MockServer extends EventEmitter {
/**
Expand Down
11 changes: 2 additions & 9 deletions lib/ws2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ const debug = require('debug')('bfx:api-mock-srv:ws2')

const MockServer = require('../server')

/**
* A WSv2 mock response packet
*
* @typedef {object|Array} MockWSv2ServerResponse
*/

/**
* Acts as a mock for v2 of the Bitfinex websocket API. Responses to available
* commands are loaded from data/ws2.json and can be modified at runtime. The
Expand All @@ -26,8 +20,7 @@ const MockServer = require('../server')
* sent in order. A packet can be a string referencing another response by key.
*
* @class
* @memberof module:bfx-api-mock-srv
* @augments module:bfx-api-mock-srv.MockServer
* @augments MockServer
*/
class MockWSv2Server extends MockServer {
/**
Expand Down Expand Up @@ -98,7 +91,7 @@ class MockWSv2Server extends MockServer {
* @private
*
* @param {string} key - key
* @returns {MockWSv2ServerResponse[]} packets
* @returns {Array} packets
*/
_prepareResponsePackets (key) {
const res = this._responses.get(key)
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "npm run lint && npm run unit",
"lint": "./node_modules/.bin/eslint lib/ examples/ test/ index.js",
"unit": "NODE_ENV=test ./node_modules/.bin/nyc --reporter=lcov --reporter=html mocha -b --recursive",
"docs": "rm -rf docs/*.md && ./node_modules/.bin/jsdoc2md --plugin dmd-readable -f index.js lib/*.js lib/**/*.js > docs/reference.md"
"docs": "rm -rf docs/*.md && ./node_modules/.bin/jsdoc2md -f index.js 'lib/**/*.js' > docs/reference.md"
},
"repository": {
"type": "git",
Expand All @@ -35,7 +35,6 @@
},
"devDependencies": {
"bfx-api-node-rest": "^3.0.15",
"dmd-readable": "^1.2.1",
"eslint": "^7.2.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
Expand Down

0 comments on commit 4e3440a

Please sign in to comment.