@@ -88,6 +88,74 @@ describe("E2E CLI server test with directory listing/index ", function () {
88
88
} ) ;
89
89
it ( "Sets the correct server options" , function ( ) {
90
90
assert . equal ( instance . options . getIn ( [ "server" , "directory" ] ) , true ) ;
91
- assert . equal ( instance . options . getIn ( [ "server" , "index" ] ) , "index.htm" ) ;
91
+ assert . equal ( instance . options . getIn ( [ "server" , "serveStaticOptions" , " index"] ) , "index.htm" ) ;
92
92
} ) ;
93
93
} ) ;
94
+
95
+ describe ( "E2E CLI server test with extensions option - single" , function ( ) {
96
+
97
+ var instance ;
98
+
99
+ before ( function ( done ) {
100
+
101
+ browserSync . reset ( ) ;
102
+
103
+ cli ( {
104
+ cli : {
105
+ input : [ "start" ] ,
106
+ flags : {
107
+ server : "test/fixtures" ,
108
+ open : false ,
109
+ online : false ,
110
+ logLevel : "silent" ,
111
+ extensions : "html"
112
+ }
113
+ } ,
114
+ cb : function ( err , bs ) {
115
+ instance = bs ;
116
+ done ( ) ;
117
+ }
118
+ } ) ;
119
+ } ) ;
120
+ after ( function ( ) {
121
+ instance . cleanup ( ) ;
122
+ } ) ;
123
+ it ( "Sets the extensions option (array) for serve static" , function ( ) {
124
+ assert . equal ( instance . options . getIn ( [ "server" , "serveStaticOptions" , "index" ] ) , "index.html" ) ;
125
+ assert . deepEqual ( instance . options . getIn ( [ "server" , "serveStaticOptions" , "extensions" ] ) . toJS ( ) , [ "html" ] ) ;
126
+ } ) ;
127
+ } ) ;
128
+
129
+ describe ( "E2E CLI server test with extensions option - multiple" , function ( ) {
130
+
131
+ var instance ;
132
+
133
+ before ( function ( done ) {
134
+
135
+ browserSync . reset ( ) ;
136
+
137
+ cli ( {
138
+ cli : {
139
+ input : [ "start" ] ,
140
+ flags : {
141
+ server : "test/fixtures" ,
142
+ open : false ,
143
+ online : false ,
144
+ logLevel : "silent" ,
145
+ extensions : "html,css"
146
+ }
147
+ } ,
148
+ cb : function ( err , bs ) {
149
+ instance = bs ;
150
+ done ( ) ;
151
+ }
152
+ } ) ;
153
+ } ) ;
154
+ after ( function ( ) {
155
+ instance . cleanup ( ) ;
156
+ } ) ;
157
+ it ( "Sets the extensions option (array) for serve static" , function ( ) {
158
+ assert . equal ( instance . options . getIn ( [ "server" , "serveStaticOptions" , "index" ] ) , "index.html" ) ;
159
+ assert . deepEqual ( instance . options . getIn ( [ "server" , "serveStaticOptions" , "extensions" ] ) . toJS ( ) , [ "html" , "css" ] ) ;
160
+ } ) ;
161
+ } ) ;
0 commit comments