2026-04-04 15:51:54 +09:00
|
|
|
/// <reference types="bun-types" />
|
|
|
|
|
|
2026-04-04 01:51:48 +09:00
|
|
|
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", () => {
|
2026-04-06 18:45:33 +09:00
|
|
|
test("use pure bun test for workflows", () => {
|
2026-04-04 01:51:48 +09:00
|
|
|
for (const workflowPath of workflowPaths) {
|
2026-04-04 18:56:26 +09:00
|
|
|
// #given
|
2026-04-04 01:51:48 +09:00
|
|
|
const workflow = readFileSync(workflowPath, "utf8")
|
|
|
|
|
|
|
|
|
|
expect(workflow).toContain("- name: Run tests")
|
2026-04-06 18:45:33 +09:00
|
|
|
expect(workflow).toContain("run: bun test")
|
2026-04-04 01:51:48 +09:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|