-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathfastboot-rendermode-config-test.js
More file actions
42 lines (34 loc) · 1.07 KB
/
fastboot-rendermode-config-test.js
File metadata and controls
42 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
const expect = require('chai').use(require('chai-string')).expect;
const RSVP = require('rsvp');
const request = RSVP.denodeify(require('request'));
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;
describe('FastBoot renderMode config', function() {
this.timeout(400000);
let app;
before(function() {
app = new AddonTestApp();
return app.create('fastboot-rendermode-config', { emberVersion: 'latest'})
.then(function() {
return app.startServer({
command: 'serve'
});
});
});
after(function() {
return app.stopServer();
});
it('uses rehydration when rendermode is serialize', function() {
return request({
url: 'http://localhost:49741/dynamic',
headers: {
'Accept': 'text/html'
}
})
.then(function(response) {
expect(response.statusCode).to.equal(200);
expect(response.headers['content-type']).to.equalIgnoreCase('text/html; charset=utf-8');
expect(response.body).to.contain('<!--%+b:7%-->magic<!--%-b:7%-->');
});
});
});