mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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
|
--spa, -s Launch in SPA mode
|
||||||
--universal, -u Launch in Universal
|
--universal, -u Launch in Universal
|
||||||
mode (default)
|
mode (default)
|
||||||
--config-file, -c Path to Nuxt
|
--config-file, -c Path to Nuxt config
|
||||||
config file (default: nuxt.config)
|
file (default: nuxt.config)
|
||||||
--modern, -m Build/Start app for
|
--modern, -m Build/Start app for
|
||||||
modern browsers, e.g. server, client and
|
modern browsers, e.g. server, client and
|
||||||
false
|
false
|
||||||
--target, -t Build/start app for a
|
--target, -t Build/start app for a
|
||||||
different target, e.g. server,
|
different target, e.g. server,
|
||||||
serverless and static
|
serverless and static
|
||||||
--force-exit Whether Nuxt
|
--force-exit Whether Nuxt should
|
||||||
should force exit after the command has
|
force exit after the command has
|
||||||
finished
|
finished
|
||||||
--version, -v Display the Nuxt
|
--version, -v Display the Nuxt
|
||||||
version
|
version
|
||||||
|
@ -197,7 +197,7 @@ describe('server: nuxtMiddleware', () => {
|
|||||||
|
|
||||||
await nuxtMiddleware(req, res, next)
|
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 () => {
|
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(consola.warn).toBeCalledWith('http2.shouldPush is deprecated. Use http2.pushAssets function')
|
||||||
expect(context.options.render.http2.shouldPush).toBeCalledTimes(4)
|
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 () => {
|
test('should add csp header if csp is enabled', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user