Skip to content

Not found tsconfig.json warning in log #490

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

Closed
Theiaz opened this issue Aug 18, 2022 · 2 comments · Fixed by #491
Closed

Not found tsconfig.json warning in log #490

Theiaz opened this issue Aug 18, 2022 · 2 comments · Fixed by #491
Assignees

Comments

@Theiaz
Copy link

Theiaz commented Aug 18, 2022

Using vue-jest within a project which is not using typescript / tsconfig.json leads to randomly appearing warning inside my #log:

> jest ./src/test/js

 PASS  src/test/js/ComponentA.test.js

[vue-jest]: Not found tsconfig.json.
...

I'm not able to reproduce it. However, I observed that this is appearing if running my testsuite for the first time. Running it again does not show this warning.

First run:

> jest --coverage ./src/test/js

 PASS  src/test/js/ComponentA.test.js

[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.

 PASS  src/test/js/ComponentB.test.js (5.661 s)
 PASS  src/test/js/ComponentC.test.js(5.781 s)

[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.


[vue-jest]: Not found tsconfig.json.

Second run:

> jest --coverage ./src/test/js

 PASS  src/test/js/ComponentA.test.js
 PASS  src/test/js/ComponentB.test.js (5.661 s)
 PASS  src/test/js/ComponentC.test.js(5.781 s)

The following line is causing the problem which has been introduced with #471

warn(`Not found tsconfig.json.`)

Is this a problem with my config or should the warning not be displayed?

@nogic1008
Copy link
Collaborator

nogic1008 commented Aug 21, 2022

@Theiaz
In vue3-jest, getTypeScriptConfig calls every times whether project uses TypeScript or not.
I'll make a PR to fix it.

const tsconfig = getTypeScriptConfig(vueJestConfig.tsConfig)

@Theiaz
Copy link
Author

Theiaz commented Aug 22, 2022

@nogic1008 Thanks!

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

Successfully merging a pull request may close this issue.

2 participants