@@ -219,36 +219,18 @@ describe('htmlEntrypoint', function() {
219219 expect ( scripts ) . to . deep . equal ( [ ] ) ;
220220 } ) ;
221221
222- it ( 'extracts configs from meta' , function ( ) {
223- let tmpobj = tmp . dirSync ( ) ;
224- let tmpLocation = tmpobj . name ;
225-
226- let project = {
227- 'index.html' : `
228- <html>
229- <meta name="my-app/config/environment" content="%7B%22rootURL%22%3A%22%2Fcustom-root-url%2F%22%7D" >
230- <body>
231- <script src="/custom-root-url/bar.js"></script>
232- </body>
233- </html>
234- ` ,
235- } ;
236-
237- fixturify . writeSync ( tmpLocation , project ) ;
238- let { config } = htmlEntrypoint ( 'my-app' , tmpLocation , 'index.html' ) ;
239- expect ( config ) . to . deep . equal ( {
240- 'my-app' : { APP : { autoboot : false } , rootURL : '/custom-root-url/' } ,
241- } ) ;
242- } ) ;
243-
244222 it ( 'understands customized rootURL' , function ( ) {
245223 let tmpobj = tmp . dirSync ( ) ;
246224 let tmpLocation = tmpobj . name ;
225+ let config = {
226+ 'my-app' : {
227+ rootURL : '/custom-root-url/' ,
228+ } ,
229+ } ;
247230
248231 let project = {
249232 'index.html' : `
250233 <html>
251- <meta name="my-app/config/environment" content="%7B%22rootURL%22%3A%22%2Fcustom-root-url%2F%22%7D" >
252234 <body>
253235 <script src="/custom-root-url/bar.js"></script>
254236 </body>
@@ -258,7 +240,7 @@ describe('htmlEntrypoint', function() {
258240
259241 fixturify . writeSync ( tmpLocation , project ) ;
260242
261- let { scripts } = htmlEntrypoint ( 'my-app' , tmpLocation , 'index.html' ) ;
243+ let { scripts } = htmlEntrypoint ( 'my-app' , tmpLocation , 'index.html' , config ) ;
262244 expect ( scripts ) . to . deep . equal ( [ `${ tmpLocation } /bar.js` ] ) ;
263245 } ) ;
264246} ) ;
0 commit comments