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

Unable to run tests #101

Open
raakasf opened this issue May 20, 2020 · 0 comments
Open

Unable to run tests #101

raakasf opened this issue May 20, 2020 · 0 comments

Comments

@raakasf
Copy link

raakasf commented May 20, 2020

Hello,

I have been trying to run the tests but they fail with the following errors:
` FAIL specs/query_ctrl_specs.ts
● Test suite failed to run

Cannot find module 'app/plugins/sdk' from 'query_ctrl.ts'

However, Jest was able to find:
    '../src/query_ctrl.ts'

You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['ts', 'js', 'json', 'node'].

See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string



  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
  at Object.<anonymous> (src/query_ctrl.ts:10388:25)

FAIL specs/datasource_specs.ts
● Test suite failed to run

Cannot find module 'app/core/utils/datemath' from 'datasource.ts'

However, Jest was able to find:
    '../src/datasource.d.ts'
    '../src/datasource.ts'

You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['ts', 'js', 'json', 'node'].

See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string



  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
  at Object.<anonymous> (src/datasource.ts:7553:39)`

I have tried with Karma too, but even that fails. The mocks for these are in "grafana-sdk-mocks" which I am including in the ref header. I think this is some sort of configuration issue. Could someone please help with this?

Thanks.

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