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

Commit

Permalink
fix: allow empty strings in feed source
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalsadhu committed May 15, 2018
1 parent 07f0fd4 commit 216428b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/feed-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = Joi.object()
.label('file'),
source: Joi.string()
.required()
.allow('')
.label('source'),
deps: Joi.object()
.required()
Expand Down
17 changes: 17 additions & 0 deletions test/reader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,23 @@ test('should not error if any feed contains extra content keys', async () => {
).resolves.toBeDefined();
});

test('should not error if feed source is an empty string', async () => {
await expect(
bundleJS([
[
{
file: 'asd',
deps: {},
id: 'a',
entry: true,
source: '',
somethingWeird: true,
},
],
])
).resolves.toBeDefined();
});

test('should error if feed content does not contain at least 1 entrypoint', async () => {
await expect(
bundleJS([
Expand Down

0 comments on commit 216428b

Please sign in to comment.