2023-09-18 16:39:00 +00:00
|
|
|
"use strict";
|
|
|
|
|
2024-03-10 16:19:15 +00:00
|
|
|
const fs = require( "node:fs/promises" );
|
2023-09-18 16:39:00 +00:00
|
|
|
|
|
|
|
async function generateFixture() {
|
2024-03-10 16:19:15 +00:00
|
|
|
const fixture = await fs.readFile( "./test/data/qunit-fixture.html", "utf8" );
|
|
|
|
await fs.writeFile(
|
2023-09-18 16:39:00 +00:00
|
|
|
"./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();
|