UNPKG

@yoroi/swap

Version:
42 lines (41 loc) 2.63 kB
"use strict"; var _types = require("@yoroi/types"); var _getDexByProtocol = require("./getDexByProtocol"); describe('getDexByProtocol', () => { it('should return Minswap for Minswap protocols', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Minswap_v1)).toBe(_types.Swap.Dex.Minswap); expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Minswap_v2)).toBe(_types.Swap.Dex.Minswap); expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Minswap_stable)).toBe(_types.Swap.Dex.Minswap); }); it('should return Muesliswap for Muesliswap protocols', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Muesliswap_v2)).toBe(_types.Swap.Dex.Muesliswap); expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Muesliswap_clp)).toBe(_types.Swap.Dex.Muesliswap); }); it('should return Spectrum for Spectrum protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Spectrum_v1)).toBe(_types.Swap.Dex.Spectrum); }); it('should return Sundaeswap for Sundaeswap protocols', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Sundaeswap_v1)).toBe(_types.Swap.Dex.Sundaeswap); expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Sundaeswap_v3)).toBe(_types.Swap.Dex.Sundaeswap); }); it('should return Teddy for Teddy protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Teddy_v1)).toBe(_types.Swap.Dex.Teddy); }); it('should return Vyfi for Vyfi protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Vyfi_v1)).toBe(_types.Swap.Dex.Vyfi); }); it('should return Wingriders for Wingriders protocols', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Wingriders_v1)).toBe(_types.Swap.Dex.Wingriders); expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Wingriders_v2)).toBe(_types.Swap.Dex.Wingriders); }); it('should return Splash for Splash protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Splash_v1)).toBe(_types.Swap.Dex.Splash); }); it('should return Cswap for Cswap protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Cswap)).toBe(_types.Swap.Dex.Cswap); }); it('should return Unsupported for Unsupported protocol', () => { expect((0, _getDexByProtocol.getDexByProtocol)(_types.Swap.Protocol.Unsupported)).toBe(_types.Swap.Dex.Unsupported); }); }); //# sourceMappingURL=getDexByProtocol.test.js.map