-
Notifications
You must be signed in to change notification settings - Fork 76
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
Debug config for tests in current file #1790
base: main
Are you sure you want to change the base?
Conversation
Nice!
there are a few ways to proceed here, ordered by the order in which i would attempt to solve this:
|
Note it's not just
This is what I'd like to do, but I feel like I need to understand the TypeScript tooling better to do so. @robknight might have more insight on this. Ideally VSCode would be able to run exactly the same command as I actually can make a working config for the same file which calls ts-mocha directly (as
I'll put this PR in draft and upload my alternative version for discusssion. |
Updates:
|
I think that would be OK. |
How would I go about setting that up and making sure it stays up-to-date. Do I just need to manually fill in the references normally filled in by yarn fix-references? Is the presence of that file ever going to confuse other parts of the build? I'm annoyed that I can't even put a comment in that file saying what it's for, because JSON doesn't allow that. If the compiler ignores unknown fields, I may try putting a comment in a string in the JSON. |
Adds a new VSCode debug configuration to launch unit tests from the currently open file.
This works on most but not all of the tests in the repo. The passport-server tests in particular don't work. See below for more details if you want to help fix it.
To use this:
The remaining issue in passport-server tests seems to have to do with type definitions for some Chai add-ons. It might occur everywhere those add-ons are used, or it might be specific to the fact that passport-server builds an app rather tha a library. Here's the error when I try to run
lemonadePipeline.spec.ts
:I welcome suggestions on how to fix this final issue, but I think this config is useful for the tests where it works.