MCPcopy Create free account
hub / github.com/testing-library/user-event / getLibDirs

Function getLibDirs

scripts/setup.js:40–55  ·  view source on GitHub ↗
(names)

Source from the content-addressed store, hash-verified

38}
39
40async function getLibDirs(names) {
41 names ??= (await fs.readdir(indexDirLib)).filter(n => !n.startsWith('.'))
42
43 return await Promise.all(
44 names.map(name => {
45 const dir = `${indexDirLib}/${name}`
46
47 return fs.stat(`${dir}/index.js`).then(
48 () => [name, dir],
49 () => {
50 throw new Error(`${dir}/index.js could not be found.`)
51 },
52 )
53 }),
54 )
55}
56
57async function getEnvFiles(names) {
58 names ??= (await fs.readdir(indexDirEnv))

Callers 1

setup.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected