File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,15 @@ module.exports = {
30
30
name : 'https' ,
31
31
type : Boolean ,
32
32
description : 'Use HTTPS protocol.' ,
33
+ negatedDescription : 'Do not use HTTPS protocol.' ,
34
+ negative : true ,
33
35
} ,
34
36
{
35
37
name : 'http2' ,
36
38
type : Boolean ,
37
39
description : 'Use HTTP/2, must be used with HTTPS.' ,
40
+ negatedDescription : 'Do not use HTTP/2.' ,
41
+ negative : true ,
38
42
} ,
39
43
{
40
44
name : 'bonjour' ,
@@ -105,11 +109,16 @@ module.exports = {
105
109
name : 'history-api-fallback' ,
106
110
type : Boolean ,
107
111
description : 'Fallback to /index.html for Single Page Applications.' ,
112
+ negatedDescription :
113
+ 'Do not fallback to /index.html for Single Page Applications.' ,
114
+ negative : true ,
108
115
} ,
109
116
{
110
117
name : 'compress' ,
111
118
type : Boolean ,
112
119
description : 'Enable gzip compression.' ,
120
+ negatedDescription : 'Disable gzip compression.' ,
121
+ negative : true ,
113
122
} ,
114
123
{
115
124
name : 'public' ,
Original file line number Diff line number Diff line change @@ -57,6 +57,17 @@ describe('CLI', () => {
57
57
. catch ( done ) ;
58
58
} ) ;
59
59
60
+ it ( '--no-https' , ( done ) => {
61
+ testBin ( '--no-https' )
62
+ . then ( ( output ) => {
63
+ expect ( output . exitCode ) . toEqual ( 0 ) ;
64
+ expect ( / h t t p s : \/ \/ / . test ( output . stderr ) ) . toEqual ( false ) ;
65
+ expect ( / h t t p : \/ \/ l o c a l h o s t : [ 0 - 9 ] + / . test ( output . stderr ) ) . toEqual ( true ) ;
66
+ done ( ) ;
67
+ } )
68
+ . catch ( done ) ;
69
+ } ) ;
70
+
60
71
it ( '--history-api-fallback' , ( done ) => {
61
72
testBin ( '--history-api-fallback --no-color' )
62
73
. then ( ( output ) => {
@@ -67,6 +78,18 @@ describe('CLI', () => {
67
78
. catch ( done ) ;
68
79
} ) ;
69
80
81
+ it ( '--no-history-api-fallback' , ( done ) => {
82
+ testBin ( '--no-history-api-fallback' )
83
+ . then ( ( output ) => {
84
+ expect ( output . exitCode ) . toEqual ( 0 ) ;
85
+ expect ( output . stderr ) . not . toContain (
86
+ `404s will fallback to '/index.html'`
87
+ ) ;
88
+ done ( ) ;
89
+ } )
90
+ . catch ( done ) ;
91
+ } ) ;
92
+
70
93
it ( 'unspecified host and port' , ( done ) => {
71
94
testBin ( '' )
72
95
. then ( ( output ) => {
You can’t perform that action at this time.
0 commit comments