Compare commits

...

3 commits

Author SHA1 Message Date
Ethan Lane c13f6818a7 Add type/dependency label to renovate config
All checks were successful
Test / build (push) Successful in 8s
2024-07-26 18:19:09 +01:00
Ethan Lane 56c886862c Add a newline character to the output of a file (#196)
All checks were successful
Test / build (push) Successful in 7s
- Add a newline character at the end of the outputted file contents
- This is so it follows POSIX convention

#80

Reviewed-on: #196
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-26 18:18:43 +01:00
Ethan Lane 7c9411b4e2 Fix deprecated toBeCalledWith function call (#195)
All checks were successful
Test / build (push) Successful in 7s
- Remove the missed deprecated `toBeCalledWith` function call and replaced with `toHaveBeenCalledWith`
- There should now no longer be any deprecated functions

#138

Reviewed-on: #195
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-26 18:17:21 +01:00
4 changed files with 5 additions and 4 deletions

View file

@ -1,4 +1,5 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"baseBranches": ["develop"] "baseBranches": ["develop"],
"labels": ["type/dependencies"]
} }

View file

@ -9,7 +9,7 @@ export default class CliHelper {
const output = OutputHelper.GenerateOutput(response, options); const output = OutputHelper.GenerateOutput(response, options);
if (options.o) { if (options.o) {
writeFileSync(options.o, output); writeFileSync(options.o, `${output}\n`);
} else { } else {
console.log(output); console.log(output);
} }

View file

@ -35,7 +35,7 @@ describe("Endpoint", () => {
expect(OutputHelper.GenerateOutput).toHaveBeenCalledWith(response, options); expect(OutputHelper.GenerateOutput).toHaveBeenCalledWith(response, options);
expect(fs.writeFileSync).toHaveBeenCalledTimes(1); expect(fs.writeFileSync).toHaveBeenCalledTimes(1);
expect(fs.writeFileSync).toHaveBeenCalledWith("file.txt", "test output"); expect(fs.writeFileSync).toHaveBeenCalledWith("file.txt", "test output\n");
expect(console.log).not.toHaveBeenCalled(); expect(console.log).not.toHaveBeenCalled();

View file

@ -122,7 +122,7 @@ describe('randomBunny', () => {
expect(result.Error!.Code).toBe(ErrorCode.NoImageResultsFound); expect(result.Error!.Code).toBe(ErrorCode.NoImageResultsFound);
expect(result.Error!.Message).toBe(ErrorMessages.NoImageResultsFound); expect(result.Error!.Message).toBe(ErrorMessages.NoImageResultsFound);
expect(fetchMock).toBeCalledWith('https://reddit.com/r/rabbits/new.json?limit=100'); expect(fetchMock).toHaveBeenCalledWith('https://reddit.com/r/rabbits/new.json?limit=100');
}); });
test('GIVEN randomSelect does NOT find a valid response, EXPECT failure result', async () => { test('GIVEN randomSelect does NOT find a valid response, EXPECT failure result', async () => {