MCPcopy
hub / github.com/prettier/prettier / getFileStruct

Function getFileStruct

tests/integration/__tests__/patterns-dirs.js:233–239  ·  view source on GitHub ↗
(directory)

Source from the content-addressed store, hash-verified

231
232 test("file struct", async () => {
233 const getFileStruct = async (directory) =>
234 (await fs.promises.readdir(directory, { withFileTypes: true }))
235 .map((dirent) => ({
236 name: dirent.name,
237 isSymbolicLink: dirent.isSymbolicLink(),
238 }))
239 .sort((a, b) => a.name.localeCompare(b.name));
240
241 expect(await getFileStruct(directoryA)).toMatchInlineSnapshot(`
242 [

Callers 1

patterns-dirs.jsFile · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…