dojo/dojo-package-template

Tests with Intern/Atom/atom-typescript and Code Completion

Closed this issue · 3 comments

In this template, when creating unit tests, the proper way to refer to your modules so they get built properly is:

import myModule = require('src/myModule.ts');

But when using Atom and atom-typescript, this module is not found and therefore breaks any code completion/in editor validation when writing your test cases.

Nevermind... once you properly do a grunt clean build the dts-generator sorts things out for you.

Actually it seems to come and go, so I suspect there is a more solid way (or clear instructions) on how to configure/build a package to allow proper code completion.

I made some changes yesterday in 469f468 which should fix this problem. As you develop, JS emitted from the source in src and tests will be placed into _build. The test tasks in grunt will use the files in _build. This should work with grunt and with atom-typescript. Let me know if you still run into problems.