mockdeep / typewiz

Automatically discover and add missing types in your TypeScript code
https://medium.com/@urish/manual-typing-is-no-fun-introducing-typewiz-58e3e8813f4c
1.1k stars 46 forks source link

How to use typewiz with jasmine #70

Open kopach opened 6 years ago

kopach commented 6 years ago

Hi. I have all my tests written with jasmine. How can I use typewiz with jasmine?

urish commented 6 years ago

We don't currently have a specific integration for Jasmine, though, if anybody wants to try working on it, I can offer my guidance.

If you run jasmine inside node, then you can probably get it to work using typewiz-node, similarly to how we integrate with mocha.

If you run jasmine inside the browser, you can use the typewiz CLI to instrument your source code, then require the type collect snippet in your code, save the collected type info to a file, then revert the source code to remove the instrumentation, and use the applyTypes command of the CLI to apply the collected types back to your source code. If you need more details about any of the steps, let me know and I will try to help.