test: import real modules in contamination-prone tests

This commit is contained in:
YeonGyu-Kim
2026-04-04 19:41:11 +09:00
parent 051a39889d
commit b0f754f506
3 changed files with 15 additions and 3 deletions
+4 -1
View File
@@ -2,7 +2,10 @@ import { describe, expect, it } from "bun:test"
import { mkdtempSync, rmSync, writeFileSync } from "node:fs"
import { tmpdir } from "node:os"
import { join } from "node:path"
import { checkForLegacyPluginEntry } from "./legacy-plugin-warning"
const { checkForLegacyPluginEntry } = await import(
new URL("./legacy-plugin-warning.ts", import.meta.url).href
)
function createTestConfigDir(): string {
return mkdtempSync(join(tmpdir(), "omo-legacy-check-"))