Skip to content

Commit

Permalink
Skip type checking within tests
Browse files Browse the repository at this point in the history
This isn't necessary and, frankly, just annoying
  • Loading branch information
Syntro42 committed Dec 23, 2023
1 parent 8adbc38 commit 669bd2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions tests/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -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", () => {
Expand All @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand All @@ -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(
Expand Down

0 comments on commit 669bd2f

Please sign in to comment.