@yoroi/swap
Version:
The Swap package of Yoroi SDK
18 lines (17 loc) • 688 B
JavaScript
;
import { Swap } from '@yoroi/types';
import { getDexUrlByProtocol } from './getDexUrlByProtocol';
describe('getDexUrlByProtocol', () => {
it('should return the correct URL for a known protocol', () => {
const protocol = Swap.Protocol.Minswap_stable;
const result = getDexUrlByProtocol(protocol);
expect(result).toBe('https://minswap.org');
});
it('should return the default URL for an unknown protocol', () => {
const protocol = 'unknown_protocol';
const expectedUrl = 'https://yoroi-wallet.com';
const result = getDexUrlByProtocol(protocol);
expect(result).toBe(expectedUrl);
});
});
//# sourceMappingURL=getDexUrlByProtocol.test.js.map