Skip to main content

All Questions

0 votes
2 answers
34 views

What does calling 'done' do in the context of asynchronous testing?

In Louis' answer, there is the following code: describe("ModuleName", function() { var mod; beforeAll(function (done) { // This loads your module and saves it in `mod`. ...
pixelpax's user avatar
  • 1,519
4 votes
1 answer
961 views

Testing requireJS methods async with Jasmine

I am trying to test a function that requires a module using jasmine and requirejs. Here is a dummy code: define("testModule", function() { return 123; }); var test = function() { require(['...
Thiago Festa's user avatar
  • 1,132
2 votes
1 answer
91 views

How to spy a module which is loaded asynchronously

I am in the following situation. The code (3) works with the code (1) but not with the code (2). IMH, the reason is because the backendController module in case (2) is loaded asynchronously after the ...
Lorraine Bernard's user avatar