@@ -132,12 +132,22 @@ describe('client.test.js', () => {
132132 it ( 'should dev cdn config test' , ( ) => {
133133 const builder = createBuilder ( { debug : true , env : 'dev' , cdn : { url : cdnUrl } } ) ;
134134 const webpackConfig = builder . create ( ) ;
135+ expect ( webpackConfig . output . publicPath ) . to . equal ( '/public/' ) ;
136+ } ) ;
137+ it ( 'should test cdn config test' , ( ) => {
138+ const builder = createBuilder ( { debug : true , env : 'test' , cdn : { url : cdnUrl } } ) ;
139+ const webpackConfig = builder . create ( ) ;
140+ expect ( webpackConfig . output . publicPath ) . to . equal ( cdnUrl + '/' ) ;
141+ } ) ;
142+ it ( 'should prod cdn config test' , ( ) => {
143+ const builder = createBuilder ( { debug : true , env : 'prod' , cdn : { url : cdnUrl } } ) ;
144+ const webpackConfig = builder . create ( ) ;
135145 expect ( webpackConfig . output . publicPath ) . to . equal ( cdnUrl + '/' ) ;
136146 } ) ;
137147 it ( 'should dev cdn dynamicDir config test' , ( ) => {
138148 const builder = createBuilder ( { debug : true , env : 'dev' , cdn : { url : cdnUrl , dynamicDir : 'cdn' } } ) ;
139149 const webpackConfig = builder . create ( ) ;
140- expect ( webpackConfig . output . publicPath ) . to . equal ( cdnUrl + '/cdn /public/') ;
150+ expect ( webpackConfig . output . publicPath ) . to . equal ( ' /public/') ;
141151 } ) ;
142152
143153 it ( 'should dev publicPath abspath config test' , ( ) => {
0 commit comments