jquery/build/tasks/qunit_fixture.js
Michał Gołębiowski-Owczarek 84b6a0beb1
Build: Remove manual QUnit fixture resetting
It was needed when QUnit 1.x one used but we've since upgraded to QUnit 2.x.

Closes gh-4312
Ref gh-4307
2019-03-11 17:25:48 +01:00

21 lines
480 B
JavaScript

var fs = require( "fs" );
module.exports = function( grunt ) {
grunt.registerTask( "qunit_fixture", function() {
var dest = "./test/data/qunit-fixture.js";
fs.writeFileSync(
dest,
"// Generated by build/tasks/qunit_fixture.js\n" +
"QUnit.config.fixture = " +
JSON.stringify(
fs.readFileSync(
"./test/data/qunit-fixture.html",
"utf8"
).toString().replace( /\r\n/g, "\n" )
) +
";\n"
);
grunt.log.ok( "Updated " + dest + "." );
} );
};