MCPcopy
hub / github.com/methodofaction/Method-Draw / checkPollution

Function checkPollution

test/qunit/qunit.js:855–870  ·  view source on GitHub ↗
( name )

Source from the content-addressed store, hash-verified

853}
854
855function checkPollution( name ) {
856 var old = config.pollution;
857 saveGlobal();
858
859 var newGlobals = diff( old, config.pollution );
860 if ( newGlobals.length > 0 ) {
861 ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
862 config.current.expected++;
863 }
864
865 var deletedGlobals = diff( config.pollution, old );
866 if ( deletedGlobals.length > 0 ) {
867 ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
868 config.current.expected++;
869 }
870}
871
872// returns a new Array with the elements that are in a but not in b
873function diff( a, b ) {

Callers 1

qunit.jsFile · 0.85

Calls 2

saveGlobalFunction · 0.85
diffFunction · 0.85

Tested by

no test coverage detected