Skip to content

Commit f1beea5

Browse files
committed
fix: removed global setup, and made deps in playwright config
1 parent 363bce9 commit f1beea5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// packages/core/__tests__/helpers/globalSetup.next.js
2+
import { resetZeroUiState } from '../helpers/resetProjectState.js';
3+
import { loadCliFromFixture } from '../helpers/loadCli.js';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
8+
console.log('__dirname: ', __dirname);
9+
10+
export default async function globalSetup() {
11+
const projectDir = path.resolve(__dirname, '../fixtures/next');
12+
console.log('projectDir: ', projectDir);
13+
14+
// Reset and setup the Next.js fixture
15+
console.log('[Global Setup] Setting up Next.js fixture...');
16+
await resetZeroUiState(projectDir, true);
17+
18+
const zeroUiCli = await loadCliFromFixture(projectDir);
19+
await zeroUiCli([]);
20+
21+
console.log('[Global Setup] Next.js fixture setup complete!');
22+
}

0 commit comments

Comments
 (0)