diff --git a/Gruntfile.js b/Gruntfile.js index 81b7e8de..5c1d3a07 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -61,16 +61,16 @@ module.exports = function( grunt ) { coverage: { disposeCollector: true, instrumentedFiles: "temp/", - src: [ "dist/jquery-migrate.js" ], - htmlReport: "coverage/", - lcovReport: "coverage/", + src: [ "src/!(intro.js|outro.js)" ], + htmlReport: "coverage/html", + lcovReport: "coverage/lcov", linesThresholdPct: 85 } }, files: [ "test/**/*.html" ] }, coveralls: { - src: "coverage/lcov.info", + src: "coverage/lcov/lcov.info", options: { // Should not fail if coveralls is down diff --git a/test/testinit.js b/test/testinit.js index 28fb2db4..8ddd775f 100644 --- a/test/testinit.js +++ b/test/testinit.js @@ -1,4 +1,3 @@ - TestManager = { /* * Load a version of a file based on URL parameters. @@ -9,14 +8,34 @@ TestManager = { * else Full or relative path to be used for script src */ loadProject: function( projectName, defaultVersion, isSelf ) { - var file, + var file, i, + lines = "", urlTag = this.projects[ projectName ].urlTag, matcher = new RegExp( "\\b" + urlTag + "=([^&]+)" ), projectRoot = isSelf ? ".." : "../../" + projectName, version = ( matcher.exec( document.location.search ) || {} )[ 1 ] || defaultVersion; if ( version === "dev" ) { - file = projectRoot + "/dist/" + projectName + ".js"; + + // Order is important + file = [ + "version", + "migrate", + "attributes", + "core", + "css", + "ajax", + "data", + "manipulation", + "effects", + "event", + "traversing", + "deferred" + ]; + + for ( i = 0; i < file.length; i++ ) { + file[ i ] = projectRoot + "/src/" + file[ i ] + ".js"; + } } else if ( version === "min" ) { file = projectRoot + "/dist/" + projectName + ".min.js"; } else if ( /^[\w\.\-]+$/.test( version ) ) { @@ -30,8 +49,16 @@ TestManager = { file: file } ); - // Prevents a jshint warning about eval-like behavior of document.write - document.write( "" ); + if ( typeof file === "string" ) { + document.write( "" ); + + } else { + for ( i = 0; i < file.length; i++ ) { + lines += ""; + } + + document.write( lines ); + } }, init: function( projects ) { var p, project;