Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Commit 216428b

Browse files
committed
fix: allow empty strings in feed source
1 parent 07f0fd4 commit 216428b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/feed-schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = Joi.object()
1414
.label('file'),
1515
source: Joi.string()
1616
.required()
17+
.allow('')
1718
.label('source'),
1819
deps: Joi.object()
1920
.required()

test/reader.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,23 @@ test('should not error if any feed contains extra content keys', async () => {
229229
).resolves.toBeDefined();
230230
});
231231

232+
test('should not error if feed source is an empty string', async () => {
233+
await expect(
234+
bundleJS([
235+
[
236+
{
237+
file: 'asd',
238+
deps: {},
239+
id: 'a',
240+
entry: true,
241+
source: '',
242+
somethingWeird: true,
243+
},
244+
],
245+
])
246+
).resolves.toBeDefined();
247+
});
248+
232249
test('should error if feed content does not contain at least 1 entrypoint', async () => {
233250
await expect(
234251
bundleJS([

0 commit comments

Comments
 (0)