2021-12-02 10:19:32 +08:00
|
|
|
import path from "node:path";
|
|
|
|
|
import prettier from "prettier-local";
|
|
|
|
|
import createEsmUtils from "esm-utils";
|
2020-08-21 09:43:24 +08:00
|
|
|
|
2021-12-02 10:19:32 +08:00
|
|
|
const { __dirname } = createEsmUtils(import.meta);
|
2020-08-21 09:43:24 +08:00
|
|
|
|
|
|
|
|
test("API resolveConfigFile", async () => {
|
|
|
|
|
const result = await prettier.resolveConfigFile();
|
|
|
|
|
expect(result).toEqual(path.join(__dirname, "../../../.prettierrc"));
|
|
|
|
|
});
|