Skip to content

Commit 3a8e385

Browse files
committed
add test to make sure rehydration is on
1 parent 30ffaeb commit 3a8e385

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
});

0 commit comments

Comments
 (0)