@@ -50,41 +50,6 @@ describe('FastBoot', function() {
5050 expect ( fn ) . to . throw ( / ( .+ ) p a c k a g e .j s o n w a s m a l f o r m e d o r d i d n o t c o n t a i n a f a s t b o o t c o n f i g / ) ;
5151 } ) ;
5252
53- it ( 'can render HTML' , function ( ) {
54- var fastboot = new FastBoot ( {
55- distPath : fixture ( 'basic-app' ) ,
56- } ) ;
57-
58- return fastboot
59- . visit ( '/' )
60- . then ( r => r . html ( ) )
61- . then ( html => {
62- expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
63- } ) ;
64- } ) ;
65-
66- it ( 'can run multiple visits' , async function ( ) {
67- this . timeout ( 3000 ) ;
68-
69- var fastboot = new FastBoot ( {
70- distPath : fixture ( 'basic-app' ) ,
71- } ) ;
72-
73- let result = await fastboot . visit ( '/' ) ;
74- let html = await result . html ( ) ;
75-
76- expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
77-
78- result = await fastboot . visit ( '/' ) ;
79- html = await result . html ( ) ;
80-
81- expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
82-
83- result = await fastboot . visit ( '/' ) ;
84- html = await result . html ( ) ;
85-
86- expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
87- } ) ;
8853
8954 it ( 'can render HTML with array of app files defined in package.json' , function ( ) {
9055 var fastboot = new FastBoot ( {
@@ -99,21 +64,6 @@ describe('FastBoot', function() {
9964 } ) ;
10065 } ) ;
10166
102- it ( 'cannot not render app HTML with shouldRender set as false' , function ( ) {
103- var fastboot = new FastBoot ( {
104- distPath : fixture ( 'basic-app' ) ,
105- } ) ;
106-
107- return fastboot
108- . visit ( '/' , {
109- shouldRender : false ,
110- } )
111- . then ( r => r . html ( ) )
112- . then ( html => {
113- expect ( html ) . to . not . match ( / W e l c o m e t o E m b e r / ) ;
114- } ) ;
115- } ) ;
116-
11767 it ( 'outputs html attributes from the fastboot app' , function ( ) {
11868 var fastboot = new FastBoot ( {
11969 distPath : fixture ( 'custom-html-attrs' ) ,
@@ -168,33 +118,6 @@ describe('FastBoot', function() {
168118 } ) ;
169119 } ) ;
170120
171- it ( 'can serialize the head and body' , function ( ) {
172- var fastboot = new FastBoot ( {
173- distPath : fixture ( 'basic-app' ) ,
174- } ) ;
175-
176- return fastboot . visit ( '/' ) . then ( r => {
177- let contents = r . domContents ( ) ;
178-
179- expect ( contents . head ) . to . equal ( '' ) ;
180- expect ( contents . body ) . to . match ( / W e l c o m e t o E m b e r / ) ;
181- } ) ;
182- } ) ;
183-
184- it ( 'can forcefully destroy the app instance using destroyAppInstanceInMs' , function ( ) {
185- var fastboot = new FastBoot ( {
186- distPath : fixture ( 'basic-app' ) ,
187- } ) ;
188-
189- return fastboot
190- . visit ( '/' , {
191- destroyAppInstanceInMs : 5 ,
192- } )
193- . catch ( e => {
194- expect ( e . message ) . to . equal ( 'App instance was forcefully destroyed in 5ms' ) ;
195- } ) ;
196- } ) ;
197-
198121 it ( 'can render HTML when a custom set of sandbox globals is provided' , function ( ) {
199122 var fastboot = new FastBoot ( {
200123 distPath : fixture ( 'custom-sandbox' ) ,
@@ -264,56 +187,6 @@ describe('FastBoot', function() {
264187 } ) ;
265188 } ) ;
266189
267- it ( 'can reload the distPath' , function ( ) {
268- var fastboot = new FastBoot ( {
269- distPath : fixture ( 'basic-app' ) ,
270- } ) ;
271-
272- return fastboot
273- . visit ( '/' )
274- . then ( r => r . html ( ) )
275- . then ( html => expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) )
276- . then ( hotReloadApp )
277- . then ( ( ) => fastboot . visit ( '/' ) )
278- . then ( r => r . html ( ) )
279- . then ( html => expect ( html ) . to . match ( / G o o d b y e f r o m E m b e r / ) ) ;
280-
281- function hotReloadApp ( ) {
282- fastboot . reload ( {
283- distPath : fixture ( 'hot-swap-app' ) ,
284- } ) ;
285- }
286- } ) ;
287-
288- it ( 'can reload the app using the same buildSandboxGlobals' , function ( ) {
289- var fastboot = new FastBoot ( {
290- distPath : fixture ( 'basic-app' ) ,
291- buildSandboxGlobals ( globals ) {
292- return Object . assign ( { } , globals , {
293- foo : 5 ,
294- myVar : 'undefined' ,
295- } ) ;
296- } ,
297- } ) ;
298-
299- return fastboot
300- . visit ( '/' )
301- . then ( r => r . html ( ) )
302- . then ( html => expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) )
303- . then ( hotReloadApp )
304- . then ( ( ) => fastboot . visit ( '/foo' ) )
305- . then ( r => r . html ( ) )
306- . then ( html => {
307- expect ( html ) . to . match ( / f o o f r o m s a n d b o x : 5 / ) ;
308- } ) ;
309-
310- function hotReloadApp ( ) {
311- fastboot . reload ( {
312- distPath : fixture ( 'custom-sandbox' ) ,
313- } ) ;
314- }
315- } ) ;
316-
317190 it ( 'reads the config from package.json' , function ( ) {
318191 var fastboot = new FastBoot ( {
319192 distPath : fixture ( 'config-app' ) ,
0 commit comments