File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
packages/ember-cli-fastboot/test Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const expect = require ( 'chai' ) . use ( require ( 'chai-string' ) ) . expect ;
4+ const RSVP = require ( 'rsvp' ) ;
5+ const request = RSVP . denodeify ( require ( 'request' ) ) ;
6+
7+ const AddonTestApp = require ( 'ember-cli-addon-tests' ) . AddonTestApp ;
8+
9+ describe ( 'FastBoot renderMode config' , function ( ) {
10+ this . timeout ( 400000 ) ;
11+
12+ let app ;
13+
14+ before ( function ( ) {
15+ app = new AddonTestApp ( ) ;
16+
17+ return app . create ( 'fastboot-rendermode-config' , { emberVersion : 'latest' } )
18+ . then ( function ( ) {
19+ return app . startServer ( {
20+ command : 'serve'
21+ } ) ;
22+ } ) ;
23+ } ) ;
24+
25+ after ( function ( ) {
26+ return app . stopServer ( ) ;
27+ } ) ;
28+
29+ it . only ( 'uses rehydration when rendermode is serialize' , function ( ) {
30+ return request ( {
31+ url : 'http://localhost:49741/dynamic' ,
32+ headers : {
33+ 'Accept' : 'text/html'
34+ }
35+ } )
36+ . then ( function ( response ) {
37+ expect ( response . statusCode ) . to . equal ( 200 ) ;
38+ expect ( response . headers [ 'content-type' ] ) . to . equalIgnoreCase ( 'text/html; charset=utf-8' ) ;
39+ expect ( response . body ) . to . contain ( '<!--%+b:7%-->magic<!--%-b:7%-->' ) ;
40+ } ) ;
41+ } ) ;
42+ } ) ;
You can’t perform that action at this time.
0 commit comments