From e69e569475ce69faf6583e019ae9ed9deaa2dc4d Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Wed, 30 Aug 2023 14:35:35 -0700 Subject: [PATCH] avoid generating assets in unrelated tests --- test/biblio.js | 2 ++ test/errors.js | 2 ++ test/utils.js | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/test/biblio.js b/test/biblio.js index 3bde2c70..9ab8c60b 100644 --- a/test/biblio.js +++ b/test/biblio.js @@ -91,6 +91,7 @@ describe('Biblio', () => { `, { copyright: false, + assets: 'none', location: 'https://example.com/spec/', warn: e => { console.error('Error:', e); @@ -142,6 +143,7 @@ describe('Biblio', () => { `, { copyright: false, + assets: 'none', location: 'https://example.com/spec/', warn: e => { console.error('Error:', e); diff --git a/test/errors.js b/test/errors.js index 71338b90..ad52bd36 100644 --- a/test/errors.js +++ b/test/errors.js @@ -465,6 +465,7 @@ ${M} }; await emu.build('foo/index.html', fetch, { copyright: false, + assets: 'none', warn: e => warnings.push({ ruleId: e.ruleId, @@ -1050,6 +1051,7 @@ ${M} const fetch = () => ''; await emu.build('index.html', fetch, { copyright: false, + assets: 'none', extraBiblios: [{ 'https://tc39.es/ecma262/': [] }], }); }, /old-style biblio/); diff --git a/test/utils.js b/test/utils.js index acab77af..611a93a3 100644 --- a/test/utils.js +++ b/test/utils.js @@ -35,6 +35,7 @@ async function assertError(obj, { ruleId, nodeType, message }, opts) { if (opts?.asImport !== 'only') { await emu.build(rootFile, async () => html, { copyright: false, + assets: 'none', warn: e => warnings.push({ ruleId: e.ruleId, @@ -72,6 +73,7 @@ async function assertError(obj, { ruleId, nodeType, message }, opts) { let fetch = name => (name === rootFile ? importWrapper : html); await emu.build(rootFile, fetch, { copyright: false, + assets: 'none', warn: e => warnings.push({ ruleId: e.ruleId, @@ -112,6 +114,7 @@ async function assertErrorFree(html, opts) { await emu.build('test-example.emu', async () => html, { copyright: false, + assets: 'none', warn: e => warnings.push(e), ...opts, }); @@ -129,6 +132,7 @@ async function assertLintFree(html, opts = {}) { async function getBiblio(html) { let upstream = await emu.build('root.html', () => html, { + assets: 'none', location: 'https://example.com/spec/', }); return upstream.exportBiblio();