How to use the bfx-api-mock-srv.MockRESTv2Server function in bfx-api-mock-srv

To help you get started, we’ve selected a few bfx-api-mock-srv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bitfinexcom / bitfinex-api-node / test / lib / transports / rest-2-integration.js View on Github external
it(`${name}: fetches expected data`, (done) => {
      const srv = new MockRESTv2Server({ listen: true })
      const r = getTestREST2()
      const nn = n++

      srv.setResponse(dataKey, [nn])

      args.push((err, res) => {
        if (err) {
          return srv.close().then(() => done(err)).catch(done)
        }

        assert.deepEqual(res, [nn])
        srv.close().then(done).catch(done)
      })

      r[name].apply(r, args)
    })

bfx-api-mock-srv

Bitfinex API server mock library

Apache-2.0
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis