()
| 1444 | } |
| 1445 | |
| 1446 | function 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 |
| 1465 | function diff( a, b ) { |
no test coverage detected