Skip to content
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

Mocha Typescript and ts-node #1

Open
hyndsite opened this issue May 16, 2017 · 0 comments
Open

Mocha Typescript and ts-node #1

hyndsite opened this issue May 16, 2017 · 0 comments

Comments

@hyndsite
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant