Tag Archives: MVC

Visual Studio Javascript AMD Unit Testing

Unit Testing AMD-Style Javascript In Visual Studio

I’m currently working on a new MVC 5 client/server project. This project is an SPA (single-page application), which means the amount of Javascript client code easily dominates the amount of C# server code. In order to keep all that Javascript manageable, I’ve been writing AMD-style (asynchronous module definition) Javascript for use with Require.js. Unfortunately, unit testing AMD-style Javascript in Visual Studio doesn’t get nearly as much attention as does unit testing C# code. But the growing body of javascript code with absolutely zero test coverage was beginning to concern me. I decided it was time to address the situation.
Continue reading