MCPcopy
hub / github.com/freshframework/fresh / expectProjectFile

Function expectProjectFile

packages/init/src/init_test.ts:134–140  ·  view source on GitHub ↗
(dir: string, pathname: string)

Source from the content-addressed store, hash-verified

132}
133
134async function expectProjectFile(dir: string, pathname: string) {
135 const filePath = path.join(dir, ...pathname.split("/").filter(Boolean));
136 const stat = await Deno.stat(filePath);
137 if (!stat.isFile) {
138 throw new Error(`Not a project file: ${filePath}`);
139 }
140}
141
142async function expectNotProjectFile(dir: string, pathname: string) {
143 const filePath = path.join(dir, ...pathname.split("/").filter(Boolean));

Callers 1

init_test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected