mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
chore: update tests
This commit is contained in:
parent
c15fc421ab
commit
3b19e3f4b8
@ -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
|
||||
|
@ -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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user