How to use the @wordpress/scripts/utils.spawnScript function in @wordpress/scripts

To help you get started, we’ve selected a few @wordpress/scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ampproject / amp-wp / bin / local-env / run-e2e-tests.js View on Github external
const testsToIgnore = [];

	if ( semver.gte( semver.clean( wpVersion ), '5.3.0' ) ) {
		// Ignore tests that are not to be run in WP >= 5.3.0.
		testsToIgnore.push( 'AMP Settings Screen should not allow AMP Stories to be enabled when Gutenberg is not active' );
	}

	const testNamePatterns = testsToIgnore.map( ( testName ) => {
		return `--testNamePattern='^(?!${ testName }).*$'`;
	} );

	const cmdArgs = [ ...suppliedArgs, ...testNamePatterns ];

	// Run E2E tests.
	spawnScript( 'test-e2e', cmdArgs );
} );