You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with Typescript and using Mocha with ts-node compiler. However, because ts-node maps everything to node I am having a problem anytime test code comes across any types defined in Typescript libraries that does NOT have a node equivalent (e.g. FormData -lib.es6.d.ts, File -lib.dom.d.ts).
I have tried a number of options, including even ///reference path="....lib.dom.d.ts"....
It still throws javascript referenceError for those types (e.g. FormData, File...).
Any suggestions?
The text was updated successfully, but these errors were encountered:
Hi Thiago,
I see you're a fellow pluralsight author. I came across your article https://templecoding.com/blog/2016/05/05/unit-testing-with-typescript-and-mocha/ and had a question that I am up against that you might have resolved.
I am working with Typescript and using Mocha with ts-node compiler. However, because ts-node maps everything to node I am having a problem anytime test code comes across any types defined in Typescript libraries that does NOT have a node equivalent (e.g. FormData -lib.es6.d.ts, File -lib.dom.d.ts).
I have tried a number of options, including even ///reference path="....lib.dom.d.ts"....
It still throws javascript referenceError for those types (e.g. FormData, File...).
Any suggestions?
The text was updated successfully, but these errors were encountered: