Skip to content

Commit

Permalink
Try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dilirity committed Jul 24, 2024
1 parent cb12bfb commit 9e54186
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { execSync } from 'child_process';
import { setup as setupPuppeteer } from 'jest-environment-puppeteer';

/**
* Global setup function for Jest tests.
*
* @param {import('jest').GlobalConfig} globalConfig - Jest's global configuration object
*/
export default async function globalSetup( globalConfig ) {
// Install Chrome for Puppeteer
execSync( 'npx puppeteer browsers install chrome', { stdio: 'inherit' } );

// Run the original setup from jest-environment-puppeteer
await setupPuppeteer( globalConfig );
}

0 comments on commit 9e54186

Please sign in to comment.