Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before(() => {
nockBack.setMode(nockBack.currentMode);
// If we decide to use nock with other modules we should move this to a test helper
nockBack.fixtures = path.join(__dirname, '/nockFixtures');
});
var expect = require('chai').expect;
let kucoin = require('../app/client/kucoin');
var nockBack = require('nock').back;
nockBack.fixtures = './test/fixtures/';
nockBack.setMode('record');
describe('Kucoin init', function() {
it('should initialize properly', function() {
expect(kucoin.exchange).to.equal("Kucoin");
});
});
describe('Kucoin.getTicker()', function() {
it('should get ticker value', function() {
return nockBack('kucoin-ticker.json')
.then(async ({nockDone, context}) => {
const coin = "VEN";
const market = "BTC"
const pair = `${coin}-${market}`;
const res = await kucoin.getTicker(pair);
const beforeFn = () => {
nockBack.setMode('record');
nockBack(fixtureName, options, callback => nockDone = callback);
};