Skip to content

Commit

Permalink
Warn validation errors when not testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Apr 24, 2022
1 parent c9b501e commit bfc4ce4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/webpack/QuasarUnusedPluginOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const validator = ajv.compile({
export function validateQuasarUnusedPluginOptions(options: unknown): options is Required<QuasarUnusedPluginOptions> {
const isValid = validator(options)
if (!isValid) {
console.warn('Invalid QuasarUnusedPluginOptions', validator.errors)
throw new Error('Invalid QuasarUnusedPluginOptions')
}

Expand Down
8 changes: 8 additions & 0 deletions tests/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// eslint-disable-next-line @typescript-eslint/no-empty-function
console.debug = () => {}

// eslint-disable-next-line @typescript-eslint/no-empty-function
console.info = () => {}

// eslint-disable-next-line @typescript-eslint/no-empty-function
console.warn = () => {}

0 comments on commit bfc4ce4

Please sign in to comment.