mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 14:20:32 +11:00
reset more inputs
This commit is contained in:
parent
747b5a722c
commit
7ca909c028
1 changed files with 11 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi }
|
||||||
import run from '../src/main'
|
import run from '../src/main'
|
||||||
import apiResponse from './sample-pulls-api-response.json'
|
import apiResponse from './sample-pulls-api-response.json'
|
||||||
|
|
||||||
const repoFullName = 'foo/bar'
|
const defaultRepoFullName = 'foo/bar'
|
||||||
const repoToken = '12345'
|
const repoToken = '12345'
|
||||||
const commitSha = 'abc123'
|
const commitSha = 'abc123'
|
||||||
const simpleMessage = 'hello world'
|
const simpleMessage = 'hello world'
|
||||||
|
|
@ -26,7 +26,7 @@ type Inputs = {
|
||||||
status?: 'success' | 'failure' | 'cancelled' | 'skipped'
|
status?: 'success' | 'failure' | 'cancelled' | 'skipped'
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputs: Inputs = {
|
const defaultInputs: Inputs = {
|
||||||
message: '',
|
message: '',
|
||||||
'message-path': undefined,
|
'message-path': undefined,
|
||||||
'repo-token': '',
|
'repo-token': '',
|
||||||
|
|
@ -34,7 +34,11 @@ const inputs: Inputs = {
|
||||||
'allow-repeats': 'false',
|
'allow-repeats': 'false',
|
||||||
}
|
}
|
||||||
|
|
||||||
let issueNumber = 1
|
const defaultIssueNumber = 1
|
||||||
|
|
||||||
|
let repoFullName = defaultRepoFullName
|
||||||
|
let inputs = defaultInputs
|
||||||
|
let issueNumber = defaultIssueNumber
|
||||||
let getCommitPullsResponse
|
let getCommitPullsResponse
|
||||||
let getIssueCommentsResponse
|
let getIssueCommentsResponse
|
||||||
let postIssueCommentsResponse = {
|
let postIssueCommentsResponse = {
|
||||||
|
|
@ -86,7 +90,10 @@ describe('add-pr-comment action', () => {
|
||||||
afterAll(() => server.close())
|
afterAll(() => server.close())
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
issueNumber = 1
|
inputs = defaultInputs
|
||||||
|
issueNumber = defaultIssueNumber
|
||||||
|
repoFullName = defaultRepoFullName
|
||||||
|
|
||||||
vi.resetModules()
|
vi.resetModules()
|
||||||
|
|
||||||
github.context.sha = commitSha
|
github.context.sha = commitSha
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue