diff options
Diffstat (limited to 'client/e2e/src/utils/files.ts')
-rw-r--r-- | client/e2e/src/utils/files.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/client/e2e/src/utils/files.ts b/client/e2e/src/utils/files.ts new file mode 100644 index 000000000..c532c987e --- /dev/null +++ b/client/e2e/src/utils/files.ts | |||
@@ -0,0 +1,17 @@ | |||
1 | import { mkdirSync } from 'fs' | ||
2 | import { join } from 'path' | ||
3 | |||
4 | const SCREENSHOTS_DIRECTORY = 'screenshots' | ||
5 | |||
6 | function createScreenshotsDirectory () { | ||
7 | mkdirSync(SCREENSHOTS_DIRECTORY, { recursive: true }) | ||
8 | } | ||
9 | |||
10 | function getScreenshotPath (filename: string) { | ||
11 | return join(SCREENSHOTS_DIRECTORY, filename) | ||
12 | } | ||
13 | |||
14 | export { | ||
15 | createScreenshotsDirectory, | ||
16 | getScreenshotPath | ||
17 | } | ||