File tree Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import nodeSchema from './properties/node'
9
9
import pluginsSchema from './properties/plugins'
10
10
import resolveSchema from './properties/resolve'
11
11
import outputSchema from './properties/output'
12
+ import watchOptionsSchema from './properties/watchOptions'
12
13
import { absolutePath } from './types'
13
14
14
15
const schema = Joi . object ( {
@@ -34,6 +35,7 @@ const schema = Joi.object({
34
35
resolveLoader : resolveSchema . concat ( Joi . object ( {
35
36
moduleTemplates : Joi . array ( ) . items ( Joi . string ( ) ) ,
36
37
} ) ) ,
38
+ watchOptions : watchOptionsSchema ,
37
39
stats : Joi . any ( ) , // TODO
38
40
target : Joi . any ( ) , // TODO
39
41
Original file line number Diff line number Diff line change
1
+ import Joi from 'joi'
2
+
3
+ export default Joi . object ( {
4
+ aggregateTimeout : Joi . number ( ) ,
5
+ poll : [ Joi . bool ( ) , Joi . number ( ) ] ,
6
+ } )
Original file line number Diff line number Diff line change
1
+ import schema from './index'
2
+ import { allValid } from '../../../test/utils'
3
+
4
+ const validModuleConfigs = [
5
+ // #0
6
+ { aggregateTimeout : 300 } ,
7
+ // #1
8
+ { poll : true } ,
9
+ // #2
10
+ { poll : false } ,
11
+ // #3
12
+ { poll : 1000 } ,
13
+ ]
14
+
15
+ describe ( 'watchOptions' , ( ) => {
16
+ allValid ( validModuleConfigs , schema )
17
+ } )
18
+
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+
3
+ watchOptions : {
4
+ aggregateTimeout : 300 ,
5
+ poll : true
6
+ }
7
+
8
+ }
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+
3
+ watchOptions : {
4
+ aggregateTimeout : 300 ,
5
+ poll : 1000
6
+ }
7
+
8
+ }
You can’t perform that action at this time.
0 commit comments