Created
June 14, 2013 09:33
-
-
Save aach/5780646 to your computer and use it in GitHub Desktop.
Test how document body is cleaned/shared between tests and testcases
This file contains hidden or 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
( function ( doc ) | |
{ | |
var BODY_ID = 'batman', | |
fpCommonSetUp = function () | |
{ | |
/*:DOC += <span class="batman"></span> */ | |
}; | |
TestCase( 'is body restored between tests?', { | |
setUp: function () | |
{ | |
fpCommonSetUp.call( this ); | |
}, | |
'test lazy': function () | |
{ | |
assertTrue( true ); | |
}, | |
'test that only the last one should survive': function () | |
{ | |
assertEquals( 1, doc.getElementsByClassName( 'batman' ).length ); | |
}, | |
'test that body id is shared between TestCases': function () | |
{ | |
doc.body.id = BODY_ID; | |
assertTrue( true ); | |
} | |
} ); | |
TestCase( 'the body id is shared between TestCases', { | |
'test that the body id is not empty': function () | |
{ | |
assertEquals( BODY_ID, doc.body.id ); | |
} | |
} ); | |
}( document ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment