MCPcopy Index your code
hub / github.com/angular/angular-cli / expectFileToExist

Function expectFileToExist

tests/e2e/utils/fs.ts:100–106  ·  view source on GitHub ↗
(fileName: string)

Source from the content-addressed store, hash-verified

98}
99
100export async function expectFileToExist(fileName: string): Promise<void> {
101 try {
102 await fs.access(fileName, constants.F_OK);
103 } catch {
104 throw new Error(`File ${fileName} was expected to exist but not found...`);
105 }
106}
107
108export async function expectFileToMatch(fileName: string, regEx: RegExp | string): Promise<void> {
109 const content = await readFile(fileName);

Callers 15

cache-clean.tsFile · 0.90
base.tsFile · 0.90
dir.tsFile · 0.90
add-pwa.tsFile · 0.90
yarn-env-vars.tsFile · 0.90
file.tsFile · 0.90
registry-option.tsFile · 0.90
add-tailwindcss.tsFile · 0.90
add-version.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected