I found a Jasmine 2.4 page for testing node.js files , and even mentions installing spec and source in the spec / support / jasmine.json file. But neither the online examples nor the jasmine examples show anything about telling jasmine where to find the source files.
Therefore, I keep getting ReferenceErrors because it does not seem to read my source files. It should be noted that at the moment I just use this to teach some students how to test and use their single-player toy projects for practice. (Like a game in the Hangman CLI, something like this.) So there are no .exports modules yet, although some of their projects use require() to connect third-party modules. I used Karma until I realized that it was only for the JavaScript browser, and require does not work.
Edit: I just found this post that sets basically the same thing, but I don't want to use grunt just to make Jasmine read in the source file. It looks like it should be embedded, for example, as Karma asks where your source and special files are located.
Second edit: I didn’t need to specify here, but Emarco marked my question as a duplicate of the one I linked in my first edit above, although I very specifically explained why another post does not answer my question.
source share