diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eff50f9..9a6dc25 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,14 +10,18 @@ jobs: steps: - uses: actions/checkout@v4 - uses: borales/actions-yarn@v4 + name: Install with: cmd: install - uses: borales/actions-yarn@v4 + name: Build with: cmd: build - uses: borales/actions-yarn@v4 + name: Format with: cmd: format - uses: borales/actions-yarn@v4 + name: Lint with: cmd: lint diff --git a/tests/messages.test.ts b/tests/messages.test.ts index 8b7acfc..98f93b2 100644 --- a/tests/messages.test.ts +++ b/tests/messages.test.ts @@ -4,7 +4,7 @@ import { mockMember } from "./mockHelpers.js"; describe("MinecraftMessage class", () => { const member = mockMember(); - member.roles.highest = { hexColor: "#000000" }; + (member as any).roles.highest = { hexColor: "#000000" }; const members = { cache: [ @@ -26,11 +26,11 @@ describe("MinecraftMessage class", () => { }; it("Formats a simple message correctly", () => { - const mockMessage = { content: "simple", member: member } as Message; + const mockMessage = { content: "simple", member: member } as unknown as Message; const msg = MinecraftMessage.format(mockMessage); expect(msg).toContain("simple"); - expect(msg).toContain(member.roles.highest.hexColor); + expect(msg).toContain((member as any).roles.highest.hexColor); }); it("Formats a message with user", () => { @@ -41,7 +41,7 @@ describe("MinecraftMessage class", () => { roles: { cache: [] }, }, member: member, - } as Message; + } as unknown as Message; const msg = MinecraftMessage.format(mockMessage); expect(msg).toContain("channel @user2"); @@ -55,7 +55,7 @@ describe("MinecraftMessage class", () => { roles: roles, }, member: member, - } as Message; + } as unknown as Message; const msg = MinecraftMessage.format(mockMessage); expect(msg).toContain("channel @role2"); @@ -68,7 +68,7 @@ describe("MinecraftMessage class", () => { channels: channels, }, member: member, - } as Message; + } as unknown as Message; const msg = MinecraftMessage.format(mockMessage); expect(msg).toContain("channel #channel2"); @@ -83,7 +83,7 @@ describe("MinecraftMessage class", () => { roles: roles, }, member: member, - } as Message; + } as unknown as Message; const msg = MinecraftMessage.format(mockMessage); expect(msg).toContain(