esbuild-test-html-plugin: drop %builddir% expand
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Differential ShellCheck / shellcheck (push) Waiting to run
Cockpit manifests / validate-manifests (push) Waiting to run
Cockpit manifests / validate-schemas (push) Waiting to run

This got removed from the template with e51cf81cd2 ("unit tests: Don't
load cockpit.js in the qunit HTML template") but we've been deadcode
expanding it ever since.  Drop it.
This commit is contained in:
Allison Karlitskaya 2026-11-02 16:14:10 +01:00 committed by Allison Karlitskaya
parent bcbd5d0c01
commit 78d5d35b38

View file

@ -8,10 +8,8 @@ export const cockpitTestHtmlPlugin = ({ testFiles }) => ({
const data = fs.readFileSync(path.resolve(import.meta.dirname, "qunit-template.html.in"), "utf8");
testFiles.forEach(file => {
const test = path.parse(file).name;
const builddir = file.split("/").map(() => "../").join("");
const output = data.toString()
.replaceAll("%title%", test)
.replaceAll("%builddir%", builddir)
.replaceAll("%script%", test + '.js');
const outdir = path.join(build.initialOptions.outdir, path.dirname(file));
const outfile = test + ".html";