aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/qunit-fixture.js
blob: 3059bb92906d688769a5b85d518889f51facad8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"use strict";

const fs = require( "fs" );

async function generateFixture() {
	const fixture = await fs.promises.readFile( "./test/data/qunit-fixture.html", "utf8" );
	await fs.promises.writeFile(
		"./test/data/qunit-fixture.js",
		"// Generated by build/tasks/qunit-fixture.js\n" +
		"QUnit.config.fixture = " +
			JSON.stringify( fixture.replace( /\r\n/g, "\n" ) ) +
		";\n"
	);
	console.log( "Updated ./test/data/qunit-fixture.js" );
}

generateFixture();