@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
26 lines • 1.29 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const shouldUseReceiveOptions_1 = __importDefault(require("./shouldUseReceiveOptions"));
describe("shouldUseReceiveOptions", () => {
it("returns true for 'ethereum/erc20/usd__coin'", () => {
expect((0, shouldUseReceiveOptions_1.default)("ethereum/erc20/usd__coin")).toBe(true);
});
it("returns true for 'ethereum'", () => {
expect((0, shouldUseReceiveOptions_1.default)("ethereum")).toBe(true);
});
it("returns false for undefined", () => {
expect((0, shouldUseReceiveOptions_1.default)(undefined)).toBe(false);
});
it("returns false for empty string", () => {
expect((0, shouldUseReceiveOptions_1.default)("")).toBe(false);
});
it("returns false for other currency ids", () => {
expect((0, shouldUseReceiveOptions_1.default)("bitcoin")).toBe(false);
expect((0, shouldUseReceiveOptions_1.default)("ethereum/erc20/other_token")).toBe(false);
expect((0, shouldUseReceiveOptions_1.default)("usd__coin")).toBe(false);
});
});
//# sourceMappingURL=shouldUseReceiveOptions.test.js.map