'use strict'; Tinytest.addAsync('Isotope - fitRows', function (test, done) { var isotopeDropZone = document.createElement('div'); document.body.appendChild(isotopeDropZone); // TODO ideally we'd get the htmls straight from this repo, but no idea how to do this from TinyTest - http://stackoverflow.com/questions/27180892/pull-an-html-file-into-a-tinytest HTTP.get('http://rawgit.com/metafizzy/isotope/master/test/index.html', function callback(error, result) { // adapted from test/fit-rows.js function checkPosition(item, x, y) { var elem = item.element; var left = parseInt(elem.style.left, 10); var top = parseInt(elem.style.top, 10); test.equal([ left, top ], [ x, y ], 'item position ' + x + ', ' + y); } if (error) { test.fail({message: 'Error getting the test file. Do we have an Internet connection to rawgit.com?'}); } else { // [^] matches across newlines. Stay within the
, or else the fragment will attempt to load resources on its own. isotopeDropZone.innerHTML = result.content.match(/