Thursday 15 September 2011

javascript - TypeScript: How do you test your client-side code? -


When I write a test for my in-browser TS code, I suppress the following problem. My "Exam" code files are located in a separate folder from the "apps" code files (a system that I'm not ready to leave). Therefore, to import my "app" module, I have to:

  // test / ts / subcomponent / module. Test.ts import m = module ("../ ../Web/Scripts/SubComponent/Module ");   

It's just fine. But when loaded in the browser, it will not work obviously, because from the view of the RequireJS running in the browser, the module is located on " app / subcomponent / module " (via web server I was able to close with TS 0.8.3 after remodeling from, but in 0.9.0 it does not work anymore, because now the compiler.

So the question is: How do you test your client-side code? Obviously, I can not be the only person to do this, can I? : -)

I can not tell if you are using Visual Studio - this next bit The visual studio is specific ...

How do I do this:

In my testing project, I have created a folder called "referenced" and the project is examined The script has been referenced (add existing item & gt; link as link). Set the file to be copied to the output folder.

Source :.

Using the Add-A-link, makes the script available in your test project.

Not using Visual Studio? I recommend creating a work / job / batch file to copy files into the test folder. You can also use tsc for you.

No comments:

Post a Comment