-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored code and added documentation (#4)
- Loading branch information
Showing
10 changed files
with
329 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Setup CodeClimate' | ||
description: 'Downloads and sets up the CodeClimate Test Reporter' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Download CodeClimate Test Reporter | ||
run: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
shell: bash | ||
|
||
- name: Run CodeClimate Test Reporter before-build | ||
run: ./cc-test-reporter before-build | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { expect } from 'bun:test'; | ||
|
||
export async function expectErrorMessageToBeThrown( | ||
callback: () => Promise<unknown>, | ||
message: string | ||
) { | ||
try { | ||
await callback(); | ||
throw new Error("Expected function to throw an error, but it didn't"); | ||
} catch (error) { | ||
expect(error).toBeInstanceOf(Error); | ||
expect((error as any).message).toBe(message); | ||
} | ||
} |
Oops, something went wrong.