chore: update tests

This commit is contained in:
Pooya Parsa 2020-11-30 23:54:30 +01:00
parent c15fc421ab
commit 3b19e3f4b8
2 changed files with 6 additions and 6 deletions

View File

@ -13,16 +13,16 @@ exports[`cli/command builds help text 1`] = `
--spa, -s Launch in SPA mode
--universal, -u Launch in Universal
mode (default)
--config-file, -c Path to Nuxt
config file (default: nuxt.config)
--config-file, -c Path to Nuxt config
file (default: nuxt.config)
--modern, -m Build/Start app for
modern browsers, e.g. server, client and
false
--target, -t Build/start app for a
different target, e.g. server,
serverless and static
--force-exit Whether Nuxt
should force exit after the command has
--force-exit Whether Nuxt should
force exit after the command has
finished
--version, -v Display the Nuxt
version

View File

@ -197,7 +197,7 @@ describe('server: nuxtMiddleware', () => {
await nuxtMiddleware(req, res, next)
expect(res.setHeader).nthCalledWith(1, 'Link', '</nuxt/nuxt.js/preload1.js>; rel=preload; as=script, </nuxt/nuxt.js/preload2.js>; rel=preload; as=script, </nuxt/nuxt.js/style.css>; rel=preload; as=style')
expect(res.setHeader).nthCalledWith(1, 'Link', '</nuxt/nuxt/preload1.js>; rel=preload; as=script, </nuxt/nuxt/preload2.js>; rel=preload; as=script, </nuxt/nuxt/style.css>; rel=preload; as=style')
})
test('should ignore preload files which are excluded by shouldPush', async () => {
@ -228,7 +228,7 @@ describe('server: nuxtMiddleware', () => {
expect(consola.warn).toBeCalledWith('http2.shouldPush is deprecated. Use http2.pushAssets function')
expect(context.options.render.http2.shouldPush).toBeCalledTimes(4)
expect(res.setHeader).nthCalledWith(1, 'Link', '</nuxt/nuxt.js/preload1.js>; rel=preload; crossorigin=use-credentials; as=script, </nuxt/nuxt.js/preload2.js>; rel=modulepreload; crossorigin=use-credentials; as=script')
expect(res.setHeader).nthCalledWith(1, 'Link', '</nuxt/nuxt/preload1.js>; rel=preload; crossorigin=use-credentials; as=script, </nuxt/nuxt/preload2.js>; rel=modulepreload; crossorigin=use-credentials; as=script')
})
test('should add csp header if csp is enabled', async () => {