forked from syntaxbullet/aurorabot
feat: Introduce TimerKey enum and refactor timer key usage across services with new tests.
This commit is contained in:
44
shared/lib/constants.test.ts
Normal file
44
shared/lib/constants.test.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { describe, it, expect } from "bun:test";
|
||||
import { TimerKey, TimerType, TransactionType } from "./constants";
|
||||
|
||||
describe("TimerKey", () => {
|
||||
it("should have CHAT_XP value", () => {
|
||||
expect(TimerKey.CHAT_XP).toBe("chat_xp" as TimerKey);
|
||||
});
|
||||
|
||||
it("should have DAILY value", () => {
|
||||
expect(TimerKey.DAILY).toBe("daily" as TimerKey);
|
||||
});
|
||||
|
||||
it("should have WEEKLY value", () => {
|
||||
expect(TimerKey.WEEKLY).toBe("weekly" as TimerKey);
|
||||
});
|
||||
});
|
||||
|
||||
describe("TimerType", () => {
|
||||
it("should have COOLDOWN value", () => {
|
||||
expect(TimerType.COOLDOWN).toBe("COOLDOWN" as TimerType);
|
||||
});
|
||||
|
||||
it("should have EFFECT value", () => {
|
||||
expect(TimerType.EFFECT).toBe("EFFECT" as TimerType);
|
||||
});
|
||||
|
||||
it("should have ACCESS value", () => {
|
||||
expect(TimerType.ACCESS).toBe("ACCESS" as TimerType);
|
||||
});
|
||||
});
|
||||
|
||||
describe("TransactionType", () => {
|
||||
it("should have DAILY_REWARD value", () => {
|
||||
expect(TransactionType.DAILY_REWARD).toBe("DAILY_REWARD" as TransactionType);
|
||||
});
|
||||
|
||||
it("should have TRANSFER_IN value", () => {
|
||||
expect(TransactionType.TRANSFER_IN).toBe("TRANSFER_IN" as TransactionType);
|
||||
});
|
||||
|
||||
it("should have TRANSFER_OUT value", () => {
|
||||
expect(TransactionType.TRANSFER_OUT).toBe("TRANSFER_OUT" as TransactionType);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user