ConusAI vendor v0.1.0-beta.114
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-beta.114
2026-11-14 09:56:45 +00:00
commit 1ce8d23c35
867 changed files with 122104 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// The isolation suite reads the fixtures of registered modules only (template lesson core-2): a module folder
// kept in the repository but not registered must not fail it.
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs"
import { tmpdir } from "node:os"
import { join } from "node:path"
import { afterEach, expect, it } from "vitest"
import { isolationFilesOf } from "./support/module-isolations.js"
const made: string[] = []
afterEach(() => {
for (const dir of made.splice(0)) rmSync(dir, { recursive: true, force: true })
})
function modulesWith(layout: Record<string, boolean>): string {
const dir = mkdtempSync(join(tmpdir(), "isolation-modules-"))
made.push(dir)
for (const [id, hasFixtures] of Object.entries(layout)) {
mkdirSync(join(dir, id, "__tests__"), { recursive: true })
if (hasFixtures) writeFileSync(join(dir, id, "__tests__", "isolation.ts"), "export const isolation = {}\n")
}
return dir
}
it("reads the fixtures of the registered modules and skips a held module's", () => {
const dir = modulesWith({ widgets: true, held: true, plain: false })
expect(isolationFilesOf(dir, ["widgets", "plain"])).toEqual([join(dir, "widgets", "__tests__", "isolation.ts")])
})