Skip to content

Commit eed49df

Browse files
committed
Add another test for the classes on the HTML
1 parent c1454ef commit eed49df

File tree

5 files changed

+88053
-1
lines changed

5 files changed

+88053
-1
lines changed

test/fastboot-test.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('FastBoot', function() {
144144
});
145145
});
146146

147-
it('appends classes correctly even when there was no classes in the original html', function() {
147+
it('appends classes correctly even when there are no classes in the original body', function() {
148148
var fastboot = new FastBoot({
149149
distPath: fixture('custom-body-attrs-with-no-default-classes'),
150150
});
@@ -157,6 +157,19 @@ describe('FastBoot', function() {
157157
});
158158
});
159159

160+
it('appends classes correctly even when there are no classes in the original html', function() {
161+
var fastboot = new FastBoot({
162+
distPath: fixture('custom-html-attrs-with-no-default-classes'),
163+
});
164+
165+
return fastboot
166+
.visit('/')
167+
.then(r => r.html())
168+
.then(html => {
169+
expect(html).to.match(/<html data-before=1 data-after=2 +class="it-works"/);
170+
});
171+
});
172+
160173
it('can serialize the head and body', function() {
161174
var fastboot = new FastBoot({
162175
distPath: fixture('basic-app'),

0 commit comments

Comments
 (0)