style: biome check --fix 整形 launchAutofixPr.test 新增段
This commit is contained in:
parent
fcdf1f2222
commit
0e001a77d3
|
|
@ -536,9 +536,7 @@ describe('callAutofixPr · Phase 2 completionChecker integration', () => {
|
||||||
describe('callAutofixPr · Phase 2 completionChecker arrow body', () => {
|
describe('callAutofixPr · Phase 2 completionChecker arrow body', () => {
|
||||||
// Pull the most recent registered checker — beforeAll registers once at
|
// Pull the most recent registered checker — beforeAll registers once at
|
||||||
// module load; nothing else re-registers across this file's tests.
|
// module load; nothing else re-registers across this file's tests.
|
||||||
function getChecker(): (
|
function getChecker(): (metadata?: unknown) => Promise<string | null> {
|
||||||
metadata?: unknown,
|
|
||||||
) => Promise<string | null> {
|
|
||||||
const calls = registerCompletionCheckerMock.mock.calls.filter(
|
const calls = registerCompletionCheckerMock.mock.calls.filter(
|
||||||
c => c[0] === 'autofix-pr',
|
c => c[0] === 'autofix-pr',
|
||||||
)
|
)
|
||||||
|
|
@ -585,16 +583,16 @@ describe('callAutofixPr · Phase 2 completionChecker arrow body', () => {
|
||||||
repo: 'myrepo',
|
repo: 'myrepo',
|
||||||
prNumber: 1002,
|
prNumber: 1002,
|
||||||
})
|
})
|
||||||
expect(result).toBe(
|
expect(result).toBe('acme/myrepo#1002 merged. Autofix monitoring complete.')
|
||||||
'acme/myrepo#1002 merged. Autofix monitoring complete.',
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('passes initialHeadSha through to checkPrAutofixOutcome', async () => {
|
test('passes initialHeadSha through to checkPrAutofixOutcome', async () => {
|
||||||
const { checkPrAutofixOutcome } = await import('../prFetch.js')
|
const { checkPrAutofixOutcome } = await import('../prFetch.js')
|
||||||
const checkMock = checkPrAutofixOutcome as ReturnType<typeof mock>
|
const checkMock = checkPrAutofixOutcome as ReturnType<typeof mock>
|
||||||
checkMock.mockClear()
|
checkMock.mockClear()
|
||||||
checkMock.mockImplementationOnce(() => Promise.resolve({ completed: false }))
|
checkMock.mockImplementationOnce(() =>
|
||||||
|
Promise.resolve({ completed: false }),
|
||||||
|
)
|
||||||
const checker = getChecker()
|
const checker = getChecker()
|
||||||
await checker({
|
await checker({
|
||||||
owner: 'acme',
|
owner: 'acme',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user