[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vue3-module.
0

Configure Feed

Select the types of activity you want to include in your feed.

test: remove inapplicable test

+2 -40
+2 -40
test/module.test.ts
··· 1 - import { setupTest, get } from '@nuxt/test-utils' 1 + // import { setupTest, get } from '@nuxt/test-utils' 2 2 3 3 describe('Nuxt module', () => { 4 - setupTest({ 5 - testDir: __dirname, 6 - fixture: '../example', 7 - server: true 8 - }) 9 - 10 - test('should add timings to server response', async () => { 11 - const { headers } = await get('/') 12 - 13 - const timings = (headers['server-timing'] as string).match(/([^;]*)(;dur=\d*)(;desc=[^,]*)?, /g) 14 - 15 - expect(timings).toEqual(expect.arrayContaining([ 16 - expect.stringContaining('plugins-long-load'), 17 - expect.stringContaining('plugins-quick-load'), 18 - expect.stringContaining('store-nuxtServerInit'), 19 - expect.stringContaining('store-dispatchedAction') 20 - ])) 21 - }, 50000) 22 - }) 23 - 24 - describe('Disabled module', () => { 25 - setupTest({ 26 - testDir: __dirname, 27 - fixture: '../example', 28 - server: true, 29 - config: { 30 - timings: { 31 - enabled: false 32 - } 33 - } 34 - }) 35 - 36 - test('should not add timings to server response when disabled', async () => { 37 - const { headers } = await get('/') 38 - 39 - const timings = (headers['server-timing'] as string) 40 - 41 - expect(timings).toBeFalsy() 42 - }, 50000) 4 + it.todo('initialises with the correct config') 43 5 })