@yoroi/exchange
Version:
The Exchange package of Yoroi SDK
28 lines (27 loc) • 895 B
JavaScript
;
var _api = require("./api");
describe('getEncryptusBaseUrl', () => {
it('should return the link - sandbox', async () => {
const isProduction = false;
const partner = 'yoroi';
const expectedUrl = `https://${partner}.${_api.banxaApiConfig.sandbox.getBaseUrl}`;
const getBaseUrl = (0, _api.banxaApiGetBaseUrl)({
isProduction,
partner
});
const result = await getBaseUrl();
expect(result).toBe(expectedUrl);
});
it('should return the link - production', async () => {
const isProduction = true;
const partner = 'yoroi';
const expectedUrl = `https://${partner}.${_api.banxaApiConfig.production.getBaseUrl}`;
const getBaseUrl = (0, _api.banxaApiGetBaseUrl)({
isProduction,
partner
});
const result = await getBaseUrl();
expect(result).toBe(expectedUrl);
});
});
//# sourceMappingURL=api.test.js.map