MCPcopy Create free account
hub / github.com/amorey/loadjs / assertNotLoaded

Function assertNotLoaded

test/tests.js:470–478  ·  view source on GitHub ↗
(src)

Source from the content-addressed store, hash-verified

468
469
470 function assertNotLoaded(src) {
471 // loop through images
472 var imgs = document.getElementsByTagName('img');
473
474 Array.prototype.slice.call(imgs).forEach(function (img) {
475 // fail if image was loaded
476 if (img.src === src) assert.equal(img.naturalWidth, 0);
477 });
478 }
479
480
481 it('should load one file', function (done) {

Callers 1

tests.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…