test: isolate migrate-legacy-plugin-entry.test.ts to prevent mock contamination
This commit is contained in:
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
/// <reference path="../../bun-test.d.ts" />
|
/// <reference path="../../../bun-test.d.ts" />
|
||||||
|
|
||||||
import { afterAll, afterEach, beforeEach, describe, expect, it, mock } from "bun:test"
|
import { afterAll, afterEach, beforeEach, describe, expect, it, mock } from "bun:test"
|
||||||
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"
|
||||||
import { tmpdir } from "node:os"
|
import { tmpdir } from "node:os"
|
||||||
import { join } from "node:path"
|
import { join } from "node:path"
|
||||||
|
|
||||||
async function importFreshMigrationModule(): Promise<typeof import("./migrate-legacy-plugin-entry")> {
|
async function importFreshMigrationModule(): Promise<typeof import("../migrate-legacy-plugin-entry")> {
|
||||||
return import(`./migrate-legacy-plugin-entry?test=${Date.now()}-${Math.random()}`)
|
return import(`../migrate-legacy-plugin-entry?test=${Date.now()}-${Math.random()}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
@@ -217,4 +217,4 @@ describe("migrateLegacyPluginEntry", () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user