Files
oh-my-opencode/script/publish-workflow.test.ts
T
YeonGyu-Kim 2c081e1999 fix(ci): restore isolated Bun test execution for mock.module suites
Running Linux CI in one Bun process still leaks mock.module registrations across files, so the workflows now use a CI-specific test runner that isolates mock-heavy targets before executing the remaining suite together.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 15:51:54 +09:00

23 lines
633 B
TypeScript

/// <reference types="bun-types" />
import { describe, expect, test } from "bun:test"
import { readFileSync } from "node:fs"
const workflowPaths = [
new URL("../.github/workflows/ci.yml", import.meta.url),
new URL("../.github/workflows/publish.yml", import.meta.url),
]
describe("test workflows", () => {
test("use the CI-safe test runner for workflows", () => {
for (const workflowPath of workflowPaths) {
// given
const workflow = readFileSync(workflowPath, "utf8")
// then
expect(workflow).toContain("- name: Run tests")
expect(workflow).toContain("run: bun run test:ci")
}
})
})