Skip to content

Commit

Permalink
ETK: only match local test files
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed May 27, 2021
1 parent 7deaff1 commit 6e85f9b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions apps/editing-toolkit/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@
const defaults = require( '@wordpress/scripts/config/jest-unit.config.js' );
const path = require( 'path' );

// Basically, CWD, so 'apps/editing-toolkit'.
// Without this, it tries to use 'apps/editing-toolkit/bin'
const pluginRoot = path.resolve( './' );

const config = {
...defaults,
rootDir: path.normalize( '../../' ), // To detect wp-calypso root node_modules
testMatch: [ `${ pluginRoot }/**/?(*.)test.[jt]s?(x)` ],
testMatch: [ `${ __dirname }/**/?(*.)test.[jt]s?(x)` ],
transform: { '^.+\\.[jt]sx?$': path.join( __dirname, 'bin', 'babel-transform' ) },
setupFilesAfterEnv: [
...( defaults.setupFilesAfterEnv || [] ), // extend if present
Expand Down

0 comments on commit 6e85f9b

Please sign in to comment.