1
1
import { it , expect , describe } from 'vitest'
2
- import { createHead } from '@unhead/vue'
3
2
import { renderSSRHead } from '@unhead/ssr'
3
+ import { createHeadCore } from '@unhead/vue'
4
4
import { useScript } from '#imports'
5
5
6
6
describe ( 'script warmup' , ( ) => {
7
7
it ( 'default' , async ( ) => {
8
- const head = createHead ( )
8
+ const head = createHeadCore ( )
9
9
const script = useScript ( {
10
10
src : '/preload.js' ,
11
11
} , {
@@ -16,7 +16,7 @@ describe('script warmup', () => {
16
16
script . remove ( )
17
17
} )
18
18
it ( 'preload relative' , async ( ) => {
19
- const head = createHead ( )
19
+ const head = createHeadCore ( )
20
20
const script = useScript ( {
21
21
src : '/preload.js' ,
22
22
} , {
@@ -29,7 +29,7 @@ describe('script warmup', () => {
29
29
script . remove ( )
30
30
} )
31
31
it ( 'preconnect relative' , async ( ) => {
32
- const head = createHead ( )
32
+ const head = createHeadCore ( )
33
33
const script = useScript ( {
34
34
src : '/preconnect.js' ,
35
35
} , {
@@ -42,7 +42,7 @@ describe('script warmup', () => {
42
42
script . remove ( )
43
43
} )
44
44
it ( 'preconnect abs' , async ( ) => {
45
- const head = createHead ( )
45
+ const head = createHeadCore ( )
46
46
const script = useScript ( {
47
47
src : 'https://example.com/preconnect.js' ,
48
48
} , {
@@ -55,7 +55,7 @@ describe('script warmup', () => {
55
55
script . remove ( )
56
56
} )
57
57
it ( 'preload abs' , async ( ) => {
58
- const head = createHead ( )
58
+ const head = createHeadCore ( )
59
59
const script = useScript ( {
60
60
src : 'https://example.com/preload.js' ,
61
61
} , {
@@ -68,7 +68,7 @@ describe('script warmup', () => {
68
68
script . remove ( )
69
69
} )
70
70
it ( 'respects useScript privacy controls' , async ( ) => {
71
- const head = createHead ( )
71
+ const head = createHeadCore ( )
72
72
const script = useScript ( {
73
73
src : 'https://s.kk-resources.com/leadtag.js' ,
74
74
crossorigin : 'use-credentials' ,
@@ -81,7 +81,7 @@ describe('script warmup', () => {
81
81
script . remove ( )
82
82
} )
83
83
it ( 'respects useScript privacy controls - #293' , async ( ) => {
84
- const head = createHead ( )
84
+ const head = createHeadCore ( )
85
85
const script = useScript ( {
86
86
src : 'https://s.kk-resources.com/leadtag.js' ,
87
87
async : true ,
0 commit comments