-
Notifications
You must be signed in to change notification settings - Fork 14
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
Some common code repo unit tests are not in any tsconfig #1134
Comments
In the commit, I demonstrated a way to add the unit test layer into a common code repo. This defines a new tsconfig file in the sim repo that adds the unit tests. The primary "tsconfig.json" file is the one which should be used as a standard dependency (for client usage). I'm inclined to discuss this proposal with @zepumph before I apply it throughout the common code repos. We should also consider that some repos may have a "demo" main that has downstream dependencies, without having tests. So I'm not sure what the 2nd layer of tsconfig should be called (if we have a general term for it). |
Honestly, I think that making things as explicit as possible to start sounds best. One tsconfig for the library, another for the tests, and another for the demo (which likely includes joist). In that case, it seems like it would be easiest to potentially create tsconfig files automatically, because a default demo and tests config file will likely be quite straight forward. Do you have an opinion on the matter? |
The 2 prior commits demonstrate how to fix this for scenery-phet. |
I said on slack:
|
Also, I'm thinking of inverting this so that, say, sun/tsconfig.json has everything. And sun/tsconfig-core has only core files needed by dependencies. This would make it easier to |
OK that seems fixed. The main problem I've had with this organization is that you cannot run |
Discovered in phetsims/dot#112, some unit tests such as dot are not covered in any tsconfig. For instance, try changing LinearFunctionTests.js and see that it doesn't recompile.
The text was updated successfully, but these errors were encountered: