teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
64 stars 9 forks source link

karma-mocha looks for file in the wrong path #71

Open maccesch opened 4 years ago

maccesch commented 4 years ago

I'm using the TypeScript compiler to build my component which works without error. Next to the main component js file it also builds the test file ComponentName.spec.ts -> ComponentName.spec.js.

When I run bit test componentname it tells me it can't resolve "dist/ComponentName.spec.js". I double checked that this file is present. I think it looks in the karma-mocha folder though because it also gives me this warning:

Pattern "/path/to/project/.bit/components/testers/karma-mocha/bit.envs/1.7.1/dist/dist/ComponentName.spec.js" does not match any file.

It should instead try to resolve "/path/to/project/dist/ComponentName.spec.js".

GiladShoham commented 4 years ago

The envs are moved to another repo, I'm transferring this to the updated one.

JoshK2 commented 4 years ago

Hey @maccesch, please specify which version of the compiler and tester you use? And can you write setups to reproduce or a zip file so I'll be able to reproduce the problem.

maccesch commented 4 years ago

Hey @JoshK2, thanks for your reply. Here is a zip with the source code in question.

I'm using typescript compiler 3.1.28 and karma-mocha tester 1.7.1

Archive.zip