From ad97902d6602eb63857ac4c41cb2237d8788f1dc Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Mon, 1 Feb 2021 01:35:12 -0800 Subject: [PATCH] better formatting for stdin plugin tests --- scripts/plugin-tests.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/plugin-tests.js b/scripts/plugin-tests.js index 7b5a1ed9877..6847ec731a9 100644 --- a/scripts/plugin-tests.js +++ b/scripts/plugin-tests.js @@ -747,7 +747,8 @@ let pluginTests = { const output = path.join(testDir, 'out.js') await esbuild.build({ stdin: { - contents: `import x from "plugin"; export default x`, sourcefile: 'stdin-sourcefile', + contents: `import x from "plugin"; export default x`, + sourcefile: 'stdin-sourcefile', }, bundle: true, outfile: output, format: 'cjs', plugins: [{ name: 'name', @@ -773,7 +774,8 @@ let pluginTests = { const output = path.join(testDir, 'out.js') await esbuild.build({ stdin: { - contents: `import x from "plugin"; export default x`, sourcefile: 'stdin-sourcefile', + contents: `import x from "plugin"; export default x`, + sourcefile: 'stdin-sourcefile', resolveDir: testDir, }, bundle: true, outfile: output, format: 'cjs', plugins: [{ @@ -800,7 +802,8 @@ let pluginTests = { const output = path.join(testDir, 'out.js') await esbuild.build({ stdin: { - contents: `import x from "plugin"; export default x`, sourcefile: path.join(testDir, 'stdin-sourcefile'), + contents: `import x from "plugin"; export default x`, + sourcefile: path.join(testDir, 'stdin-sourcefile'), resolveDir: testDir, }, bundle: true, outfile: output, format: 'cjs', plugins: [{ @@ -826,7 +829,9 @@ let pluginTests = { async stdinRelative({ esbuild, testDir }) { const output = path.join(testDir, 'out.js') await esbuild.build({ - stdin: { contents: `import x from "./stdinRelative.js"; export default x` }, + stdin: { + contents: `import x from "./stdinRelative.js"; export default x`, + }, bundle: true, outfile: output, format: 'cjs', plugins: [{ name: 'name', setup(build) { @@ -851,7 +856,8 @@ let pluginTests = { const output = path.join(testDir, 'out', 'out.js') await esbuild.build({ stdin: { - contents: `import x from "./stdinRelative.js"; export default x`, resolveDir: testDir, + contents: `import x from "./stdinRelative.js"; export default x`, + resolveDir: testDir, }, bundle: true, outfile: output, format: 'cjs', plugins: [{ name: 'name',