I have a simple app, based partly on the ToDo-List example, which uses Backbone on the client side. I've installed RTD and managed to add the necessary stubs for templates at least, so now I'm stuck with the error ReferenceError: Can't find variable: Backbone
I've found this GitHub issue: Problems with _ - underscore - identifier, which is probably the same problem as I have it just with underscore instead of backbone.
The described solution to this was:
[...] The karma started phantom will require to have any dependancies in the karma.conf.js inside the files array.
Now I could add the backbone.js file from my packages folder to the files array, but few lines lower the whole .meteor/local
folder is excluded:
exclude : [
'**/3rd/**/*.js',
'**/istanbul-middleware-port/**/*',
'karma.conf.js',
'app/.meteor/local',
'app/server/fixture.js',
'app/server/fixture.coffee',
'app/packages/**/*'
],
And I don't want to test Backbone, I just use it in my application, exactly the same way, as it is used for the ToDo-List example.
What is the correct step by step solution to test (Meteor) applications with such packages (could be also jQuery, underscore or AngularJS which is referenced on the client)
Although I've had to do TDD for most of my university projects, our tests were usually only a bad joke and totally useless, so this is pretty much the first time for me, that I want to write useful tests.