Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. (function(ns, bla) {
  2.  
  3. ns.myMethod = function(param1) {
  4. //bla.callMethod();
  5. };
  6.  
  7. })(window.mymodule = window.mymodule || {}, bla);
  8.  
  9. describe("When the mymodule is loaded", function () {
  10. it("The callMethod is called", function () {
  11. window.bla = {
  12. callMethod = function() {}
  13. };
  14.  
  15. expect(bla.callMethod).hasBeenCalled(); // something like this ?
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement