@@ -10,6 +10,10 @@ it('validation', () => {
1010 new CompressionPlugin ( { test : 'foo' } ) ;
1111 } ) . not . toThrow ( ) ;
1212
13+ expect ( ( ) => {
14+ new CompressionPlugin ( { test : [ / f o o / ] } ) ;
15+ } ) . not . toThrow ( ) ;
16+
1317 expect ( ( ) => {
1418 new CompressionPlugin ( { test : [ / f o o / , / b a r / ] } ) ;
1519 } ) . not . toThrow ( ) ;
@@ -34,10 +38,18 @@ it('validation', () => {
3438 new CompressionPlugin ( { test : [ / f o o / , 'foo' , true ] } ) ;
3539 } ) . toThrowErrorMatchingSnapshot ( ) ;
3640
41+ expect ( ( ) => {
42+ new CompressionPlugin ( { include : / f o o / } ) ;
43+ } ) . not . toThrow ( ) ;
44+
3745 expect ( ( ) => {
3846 new CompressionPlugin ( { include : 'foo' } ) ;
3947 } ) . not . toThrow ( ) ;
4048
49+ expect ( ( ) => {
50+ new CompressionPlugin ( { include : [ / f o o / ] } ) ;
51+ } ) . not . toThrow ( ) ;
52+
4153 expect ( ( ) => {
4254 new CompressionPlugin ( { include : [ / f o o / , / b a r / ] } ) ;
4355 } ) . not . toThrow ( ) ;
@@ -62,10 +74,18 @@ it('validation', () => {
6274 new CompressionPlugin ( { include : [ / f o o / , 'foo' , true ] } ) ;
6375 } ) . toThrowErrorMatchingSnapshot ( ) ;
6476
77+ expect ( ( ) => {
78+ new CompressionPlugin ( { exclude : / f o o / } ) ;
79+ } ) . not . toThrow ( ) ;
80+
6581 expect ( ( ) => {
6682 new CompressionPlugin ( { exclude : 'foo' } ) ;
6783 } ) . not . toThrow ( ) ;
6884
85+ expect ( ( ) => {
86+ new CompressionPlugin ( { include : [ / f o o / ] } ) ;
87+ } ) . not . toThrow ( ) ;
88+
6989 expect ( ( ) => {
7090 new CompressionPlugin ( { exclude : [ / f o o / , / b a r / ] } ) ;
7191 } ) . not . toThrow ( ) ;
@@ -173,5 +193,9 @@ it('validation', () => {
173193 expect ( ( ) => {
174194 new CompressionPlugin ( { deleteOriginalAssets : 'true' } ) ;
175195 } ) . toThrowErrorMatchingSnapshot ( ) ;
196+
197+ expect ( ( ) => {
198+ new CompressionPlugin ( { unknown : true } ) ;
199+ } ) . toThrowErrorMatchingSnapshot ( ) ;
176200 /* eslint-enable no-new */
177201} ) ;
0 commit comments