MCPcopy Index your code
hub / github.com/mailru/FileAPI / checkPollution

Function checkPollution

tests/qunit/qunit.js:1446–1462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1444}
1445
1446function checkPollution() {
1447 var newGlobals,
1448 deletedGlobals,
1449 old = config.pollution;
1450
1451 saveGlobal();
1452
1453 newGlobals = diff( config.pollution, old );
1454 if ( newGlobals.length > 0 ) {
1455 QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
1456 }
1457
1458 deletedGlobals = diff( old, config.pollution );
1459 if ( deletedGlobals.length > 0 ) {
1460 QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
1461 }
1462}
1463
1464// returns a new Array with the elements that are in a but not in b
1465function diff( a, b ) {

Callers 1

qunit.jsFile · 0.85

Calls 2

saveGlobalFunction · 0.85
diffFunction · 0.85

Tested by

no test coverage detected