Tsdx: No tests found - exit code 1

Created on 1 May 2019  路  5Comments  路  Source: formium/tsdx

Current Behavior

After installing tsdx globally and creating a new project I ran npm test and it prompts the following to console:

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\dev\hidash
  13 files checked.
  testMatch: C:/dev/hidash/test/**\?(*.)(spec|test).{ts,tsx} - 0 matches
  testPathIgnorePatterns: \\node_modules\\ - 13 matches
  testRegex:  - 0 matches
Pattern:  - 0 matches

Also when filtering for blah.test.ts manually it won't show up.

Expected behavior

To get the default test to run and pass after installing out of the box.

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| TSDX | 0.5.4 |
| TypeScript | as bundled |
| Browser | (not involved) |
| npm | 6.7.0 |
| Operating System | Windows 10 |

bug

All 5 comments

I have the same issue.

edit: tested using npx and uninstalling tsdx globally and it doesn't work either.

I upgraded to "tsdx": "^0.5.5" and i still have the same error, but it instead of watching file changes, just returns "error Command failed with exit code 1."
@jaredpalmer

Same for me, taking a closer look now

I created the PR above. Someone should verify it still works on MacOS. Not sure why the other solution didn't work but this one does and should do the same thing.

Also I'd prefer the default behaviour to become --watchAll again as it wasn't the cause of this bug if you agree

Was this page helpful?
0 / 5 - 0 ratings