Skip to content

Commit 6ecb8bc

Browse files
committed
avoid generating assets in unrelated tests
1 parent abfbeb4 commit 6ecb8bc

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

test/biblio.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ describe('Biblio', () => {
9191
`,
9292
{
9393
copyright: false,
94+
assets: 'none',
9495
location: 'https://example.com/spec/',
9596
warn: e => {
9697
console.error('Error:', e);
@@ -142,6 +143,7 @@ describe('Biblio', () => {
142143
`,
143144
{
144145
copyright: false,
146+
assets: 'none',
145147
location: 'https://example.com/spec/',
146148
warn: e => {
147149
console.error('Error:', e);

test/errors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ ${M} </pre>
465465
};
466466
await emu.build('foo/index.html', fetch, {
467467
copyright: false,
468+
assets: 'none',
468469
warn: e =>
469470
warnings.push({
470471
ruleId: e.ruleId,
@@ -1050,6 +1051,7 @@ ${M} </pre>
10501051
const fetch = () => '';
10511052
await emu.build('index.html', fetch, {
10521053
copyright: false,
1054+
assets: 'none',
10531055
extraBiblios: [{ 'https://tc39.es/ecma262/': [] }],
10541056
});
10551057
}, /old-style biblio/);

test/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ async function assertError(obj, { ruleId, nodeType, message }, opts) {
3535
if (opts?.asImport !== 'only') {
3636
await emu.build(rootFile, async () => html, {
3737
copyright: false,
38+
assets: 'none',
3839
warn: e =>
3940
warnings.push({
4041
ruleId: e.ruleId,
@@ -72,6 +73,7 @@ async function assertError(obj, { ruleId, nodeType, message }, opts) {
7273
let fetch = name => (name === rootFile ? importWrapper : html);
7374
await emu.build(rootFile, fetch, {
7475
copyright: false,
76+
assets: 'none',
7577
warn: e =>
7678
warnings.push({
7779
ruleId: e.ruleId,
@@ -112,6 +114,7 @@ async function assertErrorFree(html, opts) {
112114

113115
await emu.build('test-example.emu', async () => html, {
114116
copyright: false,
117+
assets: 'none',
115118
warn: e => warnings.push(e),
116119
...opts,
117120
});
@@ -129,6 +132,7 @@ async function assertLintFree(html, opts = {}) {
129132

130133
async function getBiblio(html) {
131134
let upstream = await emu.build('root.html', () => html, {
135+
assets: 'none',
132136
location: 'https://example.com/spec/',
133137
});
134138
return upstream.exportBiblio();

0 commit comments

Comments
 (0)