ReferenceError: module is not defined

This is a line that I do not want to see anymore. It happened to me when I tried to set up testing an angular application with some directives, using karma. I thought that I had followed all the steps to set it all up correctly, but I kept on getting this line, indicating that something was indeed wrong. I finally got it all to work, and to prevent others (and myself) the hassle again of finding out what you have to do to get karma working correctly (especially when you already have some js files that you would like to test), I will outline here shortly what I did. Continue reading “ReferenceError: module is not defined”