Update tests

This commit is contained in:
freearhey committed 2026-09-18 11:30:45 +03:00
1 parent d7f1cdf2c1
commit 9902121ac0
10 files changed
+49 -10

No files matched your search

+15
View File
@@ -1,3 +1,4 @@
import { describe, beforeEach, it, expect } from 'vitest'
import issues from '../../__data__/input/issues'
import { pathToFileURL } from 'node:url'
import { execFileSync } from 'child_process'
@@ -57,6 +58,20 @@ describe('issue:validate', () => {
)
}
})
it('can handle streams:edit request without changes', () => {
const body = issues.find(issue => issue.number === 39098)?.body
try {
const stdout = runIssueValidate(body, 'approved,streams:edit')
if (process.env.DEBUG === 'true') console.log(stdout)
throw new Error('Failed')
} catch {
expect(content('tests/__data__/output/logs/errors.txt')).toBe(
content('tests/__data__/expected/issue_validate/logs/streams_edit_no_changes.txt')
)
}
})
})
function runIssueValidate(body: string | undefined, labels: string) {