Skip to content

Commit

Permalink
(fix): if custom jest config path, use its dir as rootDir
Browse files Browse the repository at this point in the history
- that matches Jest's default and means no changes have to be made for
  the internal jest.config.json to work with `tsdx test`
  • Loading branch information
agilgur5 committed Mar 9, 2020
1 parent fec415e commit f19fa61
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ prog
let jestConfig = {
...createJestConfig(
relativePath => path.resolve(__dirname, '..', relativePath),
paths.appRoot
opts.config ? path.dirname(opts.config) : paths.appRoot
),
...appPackageJson.jest,
};
Expand Down
1 change: 0 additions & 1 deletion test/jest.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"testEnvironment": "node",
"rootDir": "./test",
"roots": ["<rootDir>/tests"],
"collectCoverageFrom": ["**/*.js"],
"transform": {
Expand Down

0 comments on commit f19fa61

Please sign in to comment.