Skip to content

Commit

Permalink
test(nuxt3): add test case for computed head (nuxt#4361)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Apr 14, 2022
1 parent 5fef9e8 commit 3e7d6da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/fixtures/basic/pages/head.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script setup>
const a = ref('')
useHead({
bodyAttrs: {
class: 'body-attrs-test'
},
meta: [{ name: 'description', content: 'first' }]
})
useHead({ charset: 'utf-16', meta: [{ name: 'description', content: 'overriding with an inline useHead call' }] })
useHead({ charset: 'utf-16', meta: [{ name: 'description', content: computed(() => `${a.value} with an inline useHead call`) }] })
useMeta({ script: [{ children: 'console.log("works with useMeta too")' }] })
a.value = 'overriding'
</script>

<script>
Expand Down

0 comments on commit 3e7d6da

Please sign in to comment.