alpha
Login
or
Join now
danielroe.dev
/
nuxt-vue3-module
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vue3-module.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
test: remove inapplicable test
author
Daniel Roe
date
5 years ago
(Jun 8, 2021, 4:06 PM +0100)
commit
49e93ae0
49e93ae01734960132b37cf641f942ca2765a688
parent
3b95571c
3b95571c7c738149acfa84dbd085cb242d405e86
+2
-40
1 changed file
Expand all
Collapse all
Unified
Split
test
module.test.ts
+2
-40
test/module.test.ts
View file
Reviewed
···
1
1
-
import { setupTest, get } from '@nuxt/test-utils'
1
1
+
// import { setupTest, get } from '@nuxt/test-utils'
2
2
3
3
describe('Nuxt module', () => {
4
4
-
setupTest({
5
5
-
testDir: __dirname,
6
6
-
fixture: '../example',
7
7
-
server: true
8
8
-
})
9
9
-
10
10
-
test('should add timings to server response', async () => {
11
11
-
const { headers } = await get('/')
12
12
-
13
13
-
const timings = (headers['server-timing'] as string).match(/([^;]*)(;dur=\d*)(;desc=[^,]*)?, /g)
14
14
-
15
15
-
expect(timings).toEqual(expect.arrayContaining([
16
16
-
expect.stringContaining('plugins-long-load'),
17
17
-
expect.stringContaining('plugins-quick-load'),
18
18
-
expect.stringContaining('store-nuxtServerInit'),
19
19
-
expect.stringContaining('store-dispatchedAction')
20
20
-
]))
21
21
-
}, 50000)
22
22
-
})
23
23
-
24
24
-
describe('Disabled module', () => {
25
25
-
setupTest({
26
26
-
testDir: __dirname,
27
27
-
fixture: '../example',
28
28
-
server: true,
29
29
-
config: {
30
30
-
timings: {
31
31
-
enabled: false
32
32
-
}
33
33
-
}
34
34
-
})
35
35
-
36
36
-
test('should not add timings to server response when disabled', async () => {
37
37
-
const { headers } = await get('/')
38
38
-
39
39
-
const timings = (headers['server-timing'] as string)
40
40
-
41
41
-
expect(timings).toBeFalsy()
42
42
-
}, 50000)
4
4
+
it.todo('initialises with the correct config')
43
5
})