Skip to content

Commit

Permalink
CUC currency as historical
Browse files Browse the repository at this point in the history
- unit tests
  • Loading branch information
karczk-dnv committed Feb 5, 2025
1 parent e431b04 commit 86e345d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion __tests__/getIso4217Currencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('getIso4217Currencies', () => {

test('Caribbean Guilder (XCG) is returned', () => {
const countries = getIso4217Currencies("2025-03-31");
expect(countries).toHaveLength(180);
expect(countries).toHaveLength(179);
expect(countries.find(x => x.alpha3Code === "XCG")).toBeDefined();
expect(countries.find(x => x.alpha3Code === "ANG")).toBeUndefined();
});
Expand Down Expand Up @@ -71,6 +71,12 @@ describe('getIso4217Currencies', () => {
expect(countries1 === countries2).toBeTruthy();
});

test('Peso Convertible (CUC) currency is not returned', () => {
const countries = getIso4217Currencies("2025-02-25");
expect(countries).toHaveLength(179);
expect(countries.find(x => x.alpha3Code === "CUC")).toBeUndefined();
});

test('no duplicates for property alpha3Code', () => {
expect(isArrayUnique(iso4217Currencies.map(x => x.alpha3Code))).toBeTruthy();
});
Expand Down

0 comments on commit 86e345d

Please sign in to comment.