Skip to content

Commit

Permalink
refactor: more options for schema (webpack-contrib#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Dec 25, 2019
1 parent aa22e44 commit 1ffc393
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/loader-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
},
"hmr": {
"type": "boolean"
},
"reloadAll": {
"type": "boolean"
}
}
}
7 changes: 7 additions & 0 deletions test/__snapshots__/validate-loader-options.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ options.publicPath should pass \\"instanceof\\" keyword validation
options.publicPath should match some schema in anyOf
"
`;

exports[`validate options should throw an error on the "reloadAll" option with "1" value 1`] = `
"Mini CSS Extract Plugin Loader Invalid Options
options.reloadAll should be boolean
"
`;
4 changes: 4 additions & 0 deletions test/validate-loader-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ describe('validate options', () => {
success: [true, false],
failure: [1],
},
reloadAll: {
success: [true, false],
failure: [1],
},
unknown: {
success: [],
// TODO failed in next release
Expand Down

0 comments on commit 1ffc393

Please sign in to comment.