diff --git a/package.json b/package.json index 94aca49..bb039b0 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "create-symlinks": "node ./scripts/create-symlinks.js", "lerna-bootstrap": "lerna bootstrap --hoist", "postinstall": "npm-run-all lerna-bootstrap create-symlinks build", - "test": "wp-scripts test-unit", + "test": "wp-scripts test-unit-js", "test:coverage": "npm run test -- --coverage", "test:coverage-ci": "npm run test -- --coverage && codecov", "test:watch": "npm run test -- --watch", diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 7eed9f7..d5d970b 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -16,9 +16,9 @@ This is a CLI and exposes a binary called `wp-scripts` so you can call it direct ```json { "scripts": { - "test": "wp-scripts test-unit", - "test:help": "wp-scripts test-unit --help", - "test:watch": "wp-scripts test-unit --watch" + "test": "wp-scripts test-unit-js", + "test:help": "wp-scripts test-unit-js --help", + "test:watch": "wp-scripts test-unit-js --watch" } } ``` @@ -30,11 +30,11 @@ This is how you execute those scripts using the presented setup: ## Available Scripts -### `wp-scripts test-unit` +### `wp-scripts test-unit-js` _Alias_: `wp-scripts test-unit-jest` -Launches the test runner. It uses [Jest](https://facebook.github.io/jest/) behind the scenes and you are able to utilize all of its [CLI options](https://facebook.github.io/jest/docs/en/cli.html). You can also run `./node_modules/.bin/wp-scripts test-unit --help` or `npm run test:help` (if you use `package.json` setup shared above) to view all of the available options. +Launches the test runner. It uses [Jest](https://facebook.github.io/jest/) behind the scenes and you are able to utilize all of its [CLI options](https://facebook.github.io/jest/docs/en/cli.html). You can also run `./node_modules/.bin/wp-scripts test-unit-js --help` or `npm run test:help` (if you use `package.json` setup shared above) to view all of the available options. ## Inspiration diff --git a/packages/scripts/scripts/test-unit.js b/packages/scripts/scripts/test-unit-js.js similarity index 100% rename from packages/scripts/scripts/test-unit.js rename to packages/scripts/scripts/test-unit-js.js diff --git a/packages/scripts/utils/test/index.js b/packages/scripts/utils/test/index.js index 57e5cbf..3f77103 100644 --- a/packages/scripts/utils/test/index.js +++ b/packages/scripts/utils/test/index.js @@ -75,7 +75,7 @@ describe( 'utils', () => { } ); describe( 'spawnScript', () => { - const scriptName = 'test-unit'; + const scriptName = 'test-unit-js'; beforeAll( () => { exitMock.mockImplementation( ( code ) => {