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

Function getEnvFiles

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

Source from the content-addressed store, hash-verified

55}
56
57async function getEnvFiles(names) {
58 names ??= (await fs.readdir(indexDirEnv))
59 .filter(n => /^\w+\.js$/.test(n))
60 .filter(n => !ignoreEnv.includes(n))
61 .map(f => f.slice(0, f.length - 3))
62
63 return await Promise.all(
64 names.map(async name => {
65 const file = `${indexDirEnv}/${name}.js`
66
67 return fs.stat(file).then(
68 () => [name, file],
69 () => {
70 throw new Error(`${file} could not be found.`)
71 },
72 )
73 }),
74 )
75}
76
77async function installLib(name, dir) {
78 return new Promise((res, rej) => {

Callers 1

setup.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected