| 173 | |
| 174 | describe("API resolveConfig doesn’t apply editorconfig outside project when .git is present", () => { |
| 175 | async function run() { |
| 176 | const file = new URL( |
| 177 | "../cli/config/editorconfig/repo-root-git/file.js", |
| 178 | import.meta.url, |
| 179 | ); |
| 180 | await expect( |
| 181 | prettier.resolveConfig(file, { editorconfig: true }), |
| 182 | ).resolves.toMatchObject({ |
| 183 | endOfLine: "auto", |
| 184 | semi: false, |
| 185 | }); |
| 186 | await expect( |
| 187 | prettier.resolveConfig(file, { editorconfig: true }), |
| 188 | ).resolves.not.toMatchObject({ |
| 189 | useTabs: true, |
| 190 | tabWidth: 8, |
| 191 | printWidth: 100, |
| 192 | }); |
| 193 | } |
| 194 | |
| 195 | describe("when .git is a file", () => { |
| 196 | const gitFilePath = new URL( |