Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Recommend yarn t over test:watch #28254

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"test:regressions:server": "serve test/regressions",
"test:umd": "node packages/mui-material/test/umd/run.js",
"test:unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'scripts/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'",
"test:watch": "yarn test:unit --watch",
"test:argos": "node ./scripts/pushArgos.js",
"typescript": "lerna run --no-bail --parallel typescript",
"typescript:ci": "lerna run --concurrency 7 --no-bail --no-sort typescript"
Expand Down
6 changes: 3 additions & 3 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thanks for writing tests! Here's a quick run-down on our current setup.
## Getting started

1. Add a unit test to `packages/*/src/TheUnitInQuestion/TheUnitInQuestion.test.js` or an integration test `packages/*/test/`.
2. Run `yarn test:watch`.
2. Run `yarn t TheUnitInQuestion`.
3. Implement the tested behavior
4. Open a PR once the test passes or you want somebody to review your work

Expand Down Expand Up @@ -116,11 +116,11 @@ trade-off, mainly completeness vs. speed.

To run all of the unit and integration tests run `yarn test:unit`

If you want to `grep` for certain tests add `-g STRING_TO_GREP`.
If you want to `grep` for certain tests add `-g STRING_TO_GREP` though for development we recommend `yarn t <testFilePattern>`.

#### Watch the core mocha unit/integration test suite.

`yarn test:watch`
`yarn t <testFilePattern>`

First, we have the **unit test** suite.
It uses [mocha](https://mochajs.org) and a thin wrapper around `@testing-library/react`.
Expand Down
7 changes: 1 addition & 6 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function run(argv) {
if (argv.bail) {
args.push('--bail');
}
if (argv.inspectBrk) {
if (argv.debug) {
args.push('--inspect-brk');
}
if (!argv.single) {
Expand Down Expand Up @@ -82,11 +82,6 @@ yargs
description: 'Stop on first error.',
type: 'boolean',
})
.option('inspect-brk', {
alias: 'd',
description: 'Stop on first error.',
type: 'boolean',
})
.option('production', {
alias: 'p',
description:
Expand Down