Created
March 25, 2011 18:09
-
-
Save bsatrom/887293 to your computer and use it in GitHub Desktop.
Using qunit and jsmock to test the ie9ify plugin. Sadly, it doesn't look like I can mock any of the new site mode functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Getting closer... | |
var ctrl = new MockControl(); | |
var windowMock = ctrl.createMock(window.external); | |
//normally, you wouldn't need this next line, but it seems to be required in this case because window.external is a black box | |
windowMock.addMockMethod('msIsSiteMode'); | |
windowMock.expects().msIsSiteMode().andReturn(true); | |
//But this is still false... | |
equals($.ie9ify.isPinned(), true, 'isPinned should be true'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment