2025-04-23 23:42:19 +08:00
|
|
|
import url from "node:url";
|
|
|
|
|
import { prettierCliMockableEntry } from "../env.js";
|
2020-05-08 21:41:46 +08:00
|
|
|
|
2025-04-23 23:42:19 +08:00
|
|
|
async function getCliMockable() {
|
|
|
|
|
const cli = await import(url.pathToFileURL(prettierCliMockableEntry));
|
|
|
|
|
return cli.mockable;
|
|
|
|
|
}
|
2020-05-08 21:41:46 +08:00
|
|
|
|
2025-04-23 23:42:19 +08:00
|
|
|
test("isCI", async () => {
|
|
|
|
|
const mockable = await getCliMockable();
|
|
|
|
|
expect(typeof mockable.implementations.isCI()).toBe("boolean");
|
2020-08-21 09:43:24 +08:00
|
|
|
});
|