Skip to content

Commit

Permalink
[test] Recommend yarn t over test:watch
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Sep 10, 2021
1 parent 908d7b1 commit 6cd8136
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
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

0 comments on commit 6cd8136

Please sign in to comment.