Wordpress/tests/e2e/run-tests.js
Ella van Durpe 24465974cd Editor: update JavaScript packages
Also update default block categories

Props youknowriad, gziolo, aduth.
Fixes #50420, #50278.



git-svn-id: https://develop.svn.wordpress.org/trunk@48177 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-26 13:31:11 +00:00

18 lines
670 B
JavaScript

const dotenv = require( 'dotenv' );
const dotenv_expand = require( 'dotenv-expand' );
const { sync: spawn } = require( 'cross-spawn' );
const { execSync } = require( 'child_process' );
// WP_BASE_URL interpolates LOCAL_PORT, so needs to be parsed by dotenv_expand().
dotenv_expand( dotenv.config() );
const result = spawn( 'node', [ require.resolve( 'puppeteer/install' ) ], {
stdio: 'inherit',
} );
if ( result.status > 0 ) {
process.exit( result.status );
}
// Run the tests, passing additional arguments through to the test script.
execSync( 'wp-scripts test-e2e --config tests/e2e/jest.config.js ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );