Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/config/configValidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function validateConfig(config: unknown): asserts config is RepopackConfi
if (typeof style !== 'string') {
throw new RepopackConfigValidationError('output.style must be a string');
}
if (style !== 'plain' && style !== 'xml') {
throw new RepopackConfigValidationError('output.style must be either "plain" or "xml"');
if (style !== 'plain' && style !== 'xml' && style !== 'markdown') {
throw new RepopackConfigValidationError('output.style must be either "plain", "xml" or "markdown"');
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/config/configValidate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ describe('configValidate', () => {
test('should throw for invalid output.style value', () => {
const invalidConfig = { output: { style: 'invalid' } };
expect(() => validateConfig(invalidConfig)).toThrow(RepopackConfigValidationError);
expect(() => validateConfig(invalidConfig)).toThrow('output.style must be either "plain" or "xml"');
expect(() => validateConfig(invalidConfig)).toThrow('output.style must be either "plain", "xml" or "markdown"');
});
});