aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/utils/files.ts
blob: c532c987e48fc82efd91bb2981c3d33f961573db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { mkdirSync } from 'fs'
import { join } from 'path'

const SCREENSHOTS_DIRECTORY = 'screenshots'

function createScreenshotsDirectory () {
  mkdirSync(SCREENSHOTS_DIRECTORY, { recursive: true })
}

function getScreenshotPath (filename: string) {
  return join(SCREENSHOTS_DIRECTORY, filename)
}

export {
  createScreenshotsDirectory,
  getScreenshotPath
}