Skip to content

Commit

Permalink
fix: fix fs, path
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jul 29, 2024
1 parent 2125ef6 commit c1df7b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion playground/vitestGlobalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ export async function setup({ provide }: GlobalSetupContext): Promise<void> {
}
})
// also setup dedicated copy for "variant" tests
await fs.copy(
await fs.cp(
path.resolve(tempDir, 'css'),
path.resolve(tempDir, 'css__sass-modern'),
{ recursive: true },
)
}

Expand Down
2 changes: 1 addition & 1 deletion playground/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ beforeAll(async (s) => {
rootDir = fs.existsSync(testCustomRoot) ? testCustomRoot : testDir

// separate rootDir for variant
const variantName = path.basename(dirname(testPath))
const variantName = path.basename(path.dirname(testPath))
if (variantName !== '__tests__') {
const variantTestDir = testDir + '__' + variantName
if (fs.existsSync(variantTestDir)) {
Expand Down

0 comments on commit c1df7b6

Please sign in to comment.