Skip to content

Commit

Permalink
Merge pull request #126 from r-dh/patch-1
Browse files Browse the repository at this point in the history
fix: Allow markdown as valid option in configuration
  • Loading branch information
yamadashy authored Oct 15, 2024
2 parents 179b437 + c7709ad commit 370107d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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"');
});
});

0 comments on commit 370107d

Please sign in to comment.