Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump #739

Merged
merged 20 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions __tests__/lib/fetch.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/ban-ts-comment, no-console */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some minor cleanup here

import config from 'config';
import { Headers } from 'node-fetch';

Expand All @@ -21,6 +21,7 @@ describe('#fetch()', () => {
process.env.GITHUB_RUN_ID = '1658821493';
process.env.GITHUB_RUN_NUMBER = '3';
process.env.GITHUB_SHA = 'ffac537e6cbbf934b08745a378932722df287a53';
process.env.TEST_RDME_CI = 'true';
kanadgupta marked this conversation as resolved.
Show resolved Hide resolved
spy = jest.spyOn(isCI, 'isGHA');
spy.mockReturnValue(true);
});
Expand All @@ -33,6 +34,7 @@ describe('#fetch()', () => {
delete process.env.GITHUB_RUN_ID;
delete process.env.GITHUB_RUN_NUMBER;
delete process.env.GITHUB_SHA;
delete process.env.TEST_RDME_CI;
spy.mockReset();
});

Expand Down Expand Up @@ -128,7 +130,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(0);
expect(getWarningCommandOutput()).toBe('');

Expand All @@ -142,7 +143,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(1);
expect(getWarningCommandOutput()).toBe('鈿狅笍 ReadMe API Warning: some error');

Expand All @@ -156,7 +156,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(2);
expect(getWarningCommandOutput()).toBe(
'鈿狅笍 ReadMe API Warning: some error\n\n鈿狅笍 ReadMe API Warning: another error'
Expand All @@ -172,7 +171,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(1);
expect(getWarningCommandOutput()).toBe('鈿狅笍 ReadMe API Warning: some garbage error');

Expand Down