MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / assertDirectoryExists

Function assertDirectoryExists

packages/webdriverio/src/node/utils.ts:7–12  ·  view source on GitHub ↗
(filepath: string)

Source from the content-addressed store, hash-verified

5 * check if directory exists
6 */
7export async function assertDirectoryExists(filepath: string) {
8 const exist = await fs.access(path.dirname(filepath)).then(() => true, () => false)
9 if (!exist) {
10 throw new Error(`directory (${path.dirname(filepath)}) doesn't exist`)
11 }
12}

Callers 5

savePDFFunction · 0.85
saveScreenshotFunction · 0.85
saveRecordingScreenFunction · 0.85
saveElementScreenshotFunction · 0.85
utils.test.tsFile · 0.85

Calls 1

thenMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…