Skip to content

Knit tests: check if the produced code is valid TypeScript #24

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

Closed
aSemy opened this issue Apr 9, 2022 · 0 comments · Fixed by #25
Closed

Knit tests: check if the produced code is valid TypeScript #24

aSemy opened this issue Apr 9, 2022 · 0 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@aSemy
Copy link
Contributor

aSemy commented Apr 9, 2022

Currently the Knit tests only do a string comparison. But that doesn't mean the expected string is correct TypeScript...

  1. add the Gradle Node plugin, download TypeScript
  2. download TypeScript npx task
  3. in the tests, try compiling the generated TypeScript using a command line arg npx tsc (somehow? I'm not sure about this...)
  4. Check there's no errors (again, I'm not sure)
@aSemy aSemy added the enhancement New feature or request label Apr 9, 2022
@aSemy aSemy self-assigned this Apr 9, 2022
@aSemy aSemy closed this as completed in #25 Apr 10, 2022
aSemy added a commit that referenced this issue Apr 10, 2022
* initial ts compile test example

- setup Gradle Node plugin
- run tsc in test

* tidy up initial typescript compile test, and apply to all tests

very slow! need to make them parallel...?

* fix nullable values being used as indexed object keys (a good outcome from the ts compile testing!

* apply typescript compilation tests to all knit tests

- very slow, needs work to make them faster, or exclude the slow tests
- migrate all tests to Kotest (works better with coroutines)
- bump kotest version
- tag tests

* move test util to actual directory package

* code tidy up: delete unused and some renames

* exclude slow TSCompile tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant