-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add compile
option
#12
Conversation
I checked that. Running double |
Interesting work! |
Plenty of reasons, just check out its repo here to see what it has to offer: https://github.com/sindresorhus/execa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that. Running double
tsc -w
gives no errors. Perhaps it waits until the file is unlocked and then compiles the project again?
I don't know. But we can ship this and find out.
So the idea here is that AVA does the compilation, but you still need to configure the rewrite paths. Fair enough, we have #2 for that.
You need to git-ignore the build info file that TypeScript creates, and git rm
the file.
@szmarczak I've pushed some tweaks. I'm concerned about compilation being noticeably slow. Perhaps we need to force users to make a decision as to whether to have this provider compile? That is, not allow the We also need a way of communicating errors. Right now we log the And finally we need to update the documentation here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Forgot to request changes along with posting the above comment.)
Great! :D I agree on all the points, I'll try to finish the PR this week (I'm quite busy with preparing for the matura exam I'm having in <3 months). |
@szmarczak now that we're invoking |
I think so. I'll do this now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for coming back to this @szmarczak!
This is a breaking change, right?
What is the error output when you have not configured compile
?
I assume the tsc
output is printed to the console, during the test run? Is that something we want? Should we only print error output? Does it interact with any spinners AVA prints?
Yes.
No.
If the build fails then the |
|
I'd rather not interleave the output. What is the experience when there is an error? Is it graceful or confusing?
What do you think about checking if I'd be curious to hear your thoughts on the discussion in #29. Especially around changing this to |
This is the message the provider throws:
I'm assuming AVA already passes the errors from providers to stderr. Let me know if I have to do something else.
Sounds good. |
Done :) The errors are friendly now. |
Is |
I like it, it forces the config to be as described, without allowing arbitrary values through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @szmarczak. I've made the unrelated breaking changes in a separate PR, fixed some bugs, and added the 'tsc'
compilation option. I've also tweaked the readme a bit. What do you think?
Awesome 🎉 |
Neat! I'll be testing this soon. Thanks! Does anyone know if this already works with |
#5 is still open. |
Just updated Got to use |
Fixes #3
Precompile TS files before running tests. Uses
execa
, because the TS Compiler API is too complicated.