mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
11 lines
393 B
JavaScript
11 lines
393 B
JavaScript
import { cpSync, mkdirSync, rmSync } from 'node:fs'
|
|
import { dirname, resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const snapshots = dirname(fileURLToPath(import.meta.url))
|
|
const dest = resolve(snapshots, 'test-update')
|
|
|
|
rmSync(dest, { recursive: true, force: true })
|
|
mkdirSync(dest)
|
|
cpSync(resolve(snapshots, './test/fixtures/test-update'), dest, { recursive: true })
|