async test.woff2 test.png
` +
// manifest chunk should be first
@@ -243,7 +246,7 @@ describe('SSR: template option', () => {
createClientManifestAssertions(false)
function createClientManifestAssertions (runInNewContext) {
- it('bundleRenderer + renderToString + clientManifest', done => {
+ it('bundleRenderer + renderToString + clientManifest ()', done => {
createRendererWithManifest('split.js', { runInNewContext }, renderer => {
renderer.renderToString({}, (err, res) => {
expect(err).toBeNull()
@@ -257,7 +260,7 @@ describe('SSR: template option', () => {
createRendererWithManifest('split.js', {
runInNewContext,
shouldPreload: (file, type) => {
- if (type === 'image' || type === 'script' || type === 'font') {
+ if (type === 'image' || type === 'script' || type === 'font' || type === 'style') {
return true
}
}
@@ -278,7 +281,7 @@ describe('SSR: template option', () => {
createRendererWithManifest('split.js', {
runInNewContext,
template: `` +
- `{{{ renderResourceHints() }}}` +
+ `{{{ renderResourceHints() }}}{{{ renderStyles() }}}` +
`{{{ renderScripts() }}}` +
``,
inject: false
@@ -303,7 +306,8 @@ describe('SSR: template option', () => {
const customOutput =
`${
- context.renderResourceHints()
+ context.renderResourceHints() +
+ context.renderStyles()
}${
res +
context.renderScripts()