Files
olympics-calendar/test/sports.test.ts
Fabrice Lamant 13e1439023 typescript
2024-07-29 21:22:02 +02:00

18 lines
502 B
TypeScript

import { describe } from "node:test";
import { expect, it } from "vitest";
import { getSportIcon } from "../src/sports";
describe("sports", () => {
describe("getSportIcon", () => {
it("should return basketball icon", () => {
const icon = getSportIcon("basketball");
expect(icon).toBe("🏀");
});
it("should log an error and return an empty string if sport is not found", () => {
const icon = getSportIcon("ice-hockey");
expect(icon).toBe("");
});
});
});