1

I have a Backbone application and I am writing an unit test in Jasmine and I have following situation:

I created a spec file for a specific view in Backbone. For example, bagView. I just want to run my test against methods inside this view (bagView).

However, bagView loads other views through RequireJS, like productView, walletView, etc.

This is delaying the test. Each view is adding around 15 seconds to the test. So even though I just want to run test on bagView, all other views underneath are running as well.

Is there a way I can avoid this and just run bagView so that my test runs faster?

Jaspero
  • 2,912
  • 6
  • 26
  • 30
  • 2
    Probably relevant: https://stackoverflow.com/questions/11439540/how-can-i-mock-dependencies-for-unit-testing-in-requirejs – Plato Aug 28 '15 at 18:40

0 Answers0