diff --git a/playground/vitestGlobalSetup.ts b/playground/vitestGlobalSetup.ts index f73eece915df5a..193c47b6047eac 100644 --- a/playground/vitestGlobalSetup.ts +++ b/playground/vitestGlobalSetup.ts @@ -42,9 +42,10 @@ export async function setup({ provide }: GlobalSetupContext): Promise { } }) // 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 }, ) } diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts index 98942f67a22f40..eb28b5f544d453 100644 --- a/playground/vitestSetup.ts +++ b/playground/vitestSetup.ts @@ -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)) {