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

WCT + Typescript #3468

Closed
FirebladeDan opened this issue Oct 28, 2019 · 2 comments
Closed

WCT + Typescript #3468

FirebladeDan opened this issue Oct 28, 2019 · 2 comments

Comments

@FirebladeDan
Copy link

How could I configure WCT to work with typescript? The tester responds with a 'WCT searched for .js and .html files matching: test/' of which I could see .js is hardcoded in the error message..

If .ts test files is possible could you please share the config? Thank you

@lemoustachiste
Copy link

I'd second that,

I have introduced typescript into my project, only one file at this time, but WCT stopped functioning. I have a couple of ideas to solve the issue:

  • test the build code rather than files -> defeats the purpose of unit testing
  • precompile TS files to JS -> adds some noise, but doable

What I wanted to know is if there was a way to set this up in the wct.conf file, so that this problem would be abstracted away?

Thanks

@aomarks
Copy link
Member

aomarks commented Apr 30, 2020

@lemoustachiste 's second suggestion to precompile TS to JS is a good solution, and what I usually do. It's easy to set up and in my experience doesn't add noise in a way that is disruptive.

Also note that WCT is not in development anymore. I highly recommend starting to migrate to something like Karma. The open-wc docs at https://open-wc.org/testing/testing-karma.html are a good starting point.

@aomarks aomarks closed this as completed Apr 30, 2020
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

3 participants