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

Not able to run test when creating new library due to typescript v5 #1174

Open
leobastiani opened this issue Mar 22, 2023 · 0 comments
Open

Comments

@leobastiani
Copy link

Current Behavior

npx tsdx create mylib
cd mylib
yarn test

❯ yarn test
yarn run v1.22.19
$ tsdx test
 FAIL  test/blah.test.ts
  ● Test suite failed to run

    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

      at node_modules/tsdx/node_modules/ts-jest/dist/compiler/compiler-utils.js:19:27
          at Array.map (<anonymous>)
      at Object.cacheResolvedModules (node_modules/tsdx/node_modules/ts-jest/dist/compiler/compiler-utils.js:18:14)
      at compileFn (node_modules/tsdx/node_modules/ts-jest/dist/compiler/language-service.js:127:38)
      at Object.compile (node_modules/tsdx/node_modules/ts-jest/dist/compiler/instance.js:52:21)
      at TsJestTransformer.process (node_modules/tsdx/node_modules/ts-jest/dist/ts-jest-transformer.js:85:41)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:481:35)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:586:40)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.302s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Suggested solution(s)

Downgrading typescript to v4 solves the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant