zaif
Version:
Zaif API wrapper for Node.js
25 lines (19 loc) • 617 B
JavaScript
;
import { assert } from 'chai';
import Zaif from '../lib/zaif';
describe('Private API', () => {
const zaif = new Zaif();
it('If secret token and key is not set, throw a error.', () => {
assert.throws(() => {
zaif.getInfo();
}, 'Private API requires secret token and key.');
});
describe('Create Nonce', () => {
it('Return type is number.', () => {
assert.strictEqual(typeof zaif._createNonce(), 'number');
});
it('The number of digits of return value is 10 digits.', () => {
assert.strictEqual(String(zaif._createNonce()).length, 10);
});
});
});