This repository was archived by the owner on Mar 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup lint from child dep type (#36)
* chore(tests): add test for createComment util
- Loading branch information
1 parent
de300e9
commit 303aa05
Showing
6 changed files
with
39 additions
and
10 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,22 @@ | ||
import * as core from '@actions/core'; | ||
import { createComment } from '../src/comments'; | ||
|
||
jest.mock('@actions/github', () => ({ | ||
context: { | ||
payload: {}, | ||
}, | ||
})); | ||
jest.mock('@actions/core'); | ||
|
||
const mockCore = core as jest.Mocked<typeof core>; | ||
|
||
describe('Comments utils', () => { | ||
describe('createComment', () => { | ||
it('Should exit with a warning if issue number is not found', async () => { | ||
await createComment(''); | ||
expect(mockCore.warning).toHaveBeenCalledWith( | ||
'Issue number not found. Impossible to create a comment', | ||
); | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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