Skip to content

Commit

Permalink
test: update common test
Browse files Browse the repository at this point in the history
  • Loading branch information
sarneijim committed Nov 21, 2022
1 parent 70eedb7 commit c34445b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions libs/ledger-live-common/src/exchange/swap/utils/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
getAvailableAccountsById,
isRegistrationRequired,
getProviderName,
getNoticeType,
shouldShowKYCBanner,
shouldShowLoginBanner,
} from "./index";
Expand Down Expand Up @@ -347,3 +348,29 @@ describe("swap/utils/getProviderName", () => {
expect(result).toBe(expectedResult);
});
});

describe("swap/utils/getNoticeType", function () {
test("should return notice type for CIC", () => {
const expectedResult = { message: "cic", learnMore: false };

const result = getNoticeType("cic");

expect(result).toBe(expectedResult);
});

test("should return notice type for ftx", () => {
const expectedResult = { message: "default", learnMore: true };

const result = getNoticeType("ftx");

expect(result).toBe(expectedResult);
});

test("should return notice type for Changelly", () => {
const expectedResult = { message: "default", learnMore: true };

const result = getNoticeType("changelly");

expect(result).toBe(expectedResult);
});
});

0 comments on commit c34445b

Please sign in to comment.