cleaning and expand public api tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { InverseClient } from "../../src/inverse-client";
|
||||
import { successResponseList, successResponseObject } from "../response.util";
|
||||
import { notAuthenticatedError, successResponseList, successResponseObject } from "../response.util";
|
||||
|
||||
describe('Public Inverse REST API Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
@@ -12,7 +12,7 @@ describe('Public Inverse REST API Endpoints', () => {
|
||||
|
||||
describe('Inverse only endpoints', () => {
|
||||
it('should throw for unauthenticated private calls', async () => {
|
||||
expect(() => api.getPosition()).rejects.toMatchObject(new Error('Private endpoints require api and private keys set'));
|
||||
expect(() => api.getPosition()).rejects.toMatchObject(notAuthenticatedError());
|
||||
});
|
||||
|
||||
it('getKline()', async () => {
|
||||
@@ -40,7 +40,7 @@ describe('Public Inverse REST API Endpoints', () => {
|
||||
|
||||
describe('Shared endpoints', () => {
|
||||
it('should throw for unauthenticated private calls', async () => {
|
||||
expect(() => api.getApiKeyInfo()).rejects.toMatchObject(new Error('Private endpoints require api and private keys set'));
|
||||
expect(() => api.getApiKeyInfo()).rejects.toMatchObject(notAuthenticatedError());
|
||||
});
|
||||
|
||||
it('getOrderBook()', async () => {
|
||||
|
||||
Reference in New Issue
Block a user