Skip to content

Commit a9f79da

Browse files
committed
chore: broken tests unhead v2
1 parent 199164d commit a9f79da

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"@typescript-eslint/typescript-estree": "^8.25.0",
115115
"acorn-loose": "^8.4.0",
116116
"bumpp": "^10.0.3",
117+
"@unhead/ssr": "^1.11.20",
117118
"changelogen": "^0.6.0",
118119
"eslint": "9.21.0",
119120
"eslint-plugin-n": "^17.15.1",

pnpm-lock.yaml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/basic/__runtime__/warmup.nuxt.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { it, expect, describe } from 'vitest'
2-
import { createHead } from '@unhead/vue'
32
import { renderSSRHead } from '@unhead/ssr'
3+
import { createHeadCore } from '@unhead/vue'
44
import { useScript } from '#imports'
55

66
describe('script warmup', () => {
77
it('default', async () => {
8-
const head = createHead()
8+
const head = createHeadCore()
99
const script = useScript({
1010
src: '/preload.js',
1111
}, {
@@ -16,7 +16,7 @@ describe('script warmup', () => {
1616
script.remove()
1717
})
1818
it('preload relative', async () => {
19-
const head = createHead()
19+
const head = createHeadCore()
2020
const script = useScript({
2121
src: '/preload.js',
2222
}, {
@@ -29,7 +29,7 @@ describe('script warmup', () => {
2929
script.remove()
3030
})
3131
it('preconnect relative', async () => {
32-
const head = createHead()
32+
const head = createHeadCore()
3333
const script = useScript({
3434
src: '/preconnect.js',
3535
}, {
@@ -42,7 +42,7 @@ describe('script warmup', () => {
4242
script.remove()
4343
})
4444
it('preconnect abs', async () => {
45-
const head = createHead()
45+
const head = createHeadCore()
4646
const script = useScript({
4747
src: 'https://example.com/preconnect.js',
4848
}, {
@@ -55,7 +55,7 @@ describe('script warmup', () => {
5555
script.remove()
5656
})
5757
it('preload abs', async () => {
58-
const head = createHead()
58+
const head = createHeadCore()
5959
const script = useScript({
6060
src: 'https://example.com/preload.js',
6161
}, {
@@ -68,7 +68,7 @@ describe('script warmup', () => {
6868
script.remove()
6969
})
7070
it('respects useScript privacy controls', async () => {
71-
const head = createHead()
71+
const head = createHeadCore()
7272
const script = useScript({
7373
src: 'https://s.kk-resources.com/leadtag.js',
7474
crossorigin: 'use-credentials',
@@ -81,7 +81,7 @@ describe('script warmup', () => {
8181
script.remove()
8282
})
8383
it('respects useScript privacy controls - #293', async () => {
84-
const head = createHead()
84+
const head = createHeadCore()
8585
const script = useScript({
8686
src: 'https://s.kk-resources.com/leadtag.js',
8787
async: true,

0 commit comments

Comments
 (0)