Sha256: 676dc52de6a5ea365eb950e4da5158d879a9d10b781cf5eff93058d4eea26c1a
Contents?: true
Size: 766 Bytes
Versions: 2
Compression:
Stored size: 766 Bytes
Contents
var realMainFunction, realApplicationMode, timesMainCalled; module("SC.onReady.done", { setup: function() { timesMainCalled = 0; realMainFunction = window.main; window.main = function() { timesMainCalled += 1; }; realApplicationMode = SC.mode; }, teardown: function() { window.main = realMainFunction; SC.mode = realApplicationMode; } }); test("When the application is done loading in test mode", function() { SC.mode = SC.TEST_MODE; SC.onReady.done(); equals(timesMainCalled, 0, "main should not have been called"); }); test("When the application is done loading in application mode", function() { SC.mode = SC.APP_MODE; SC.onReady.done(); equals(timesMainCalled, 1, "main should have been called"); });
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
spade-0.0.1 | sproutcore/frameworks/core_foundation/tests/system/ready/done.js |
sproutcore-1.5.0.pre.5 | lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/ready/done.js |