Skip to content

Commit

Permalink
test: fix source script (#52)
Browse files Browse the repository at this point in the history
convertPageMeta handles defineNuxtComponent function

Co-authored-by: Ryota Watanabe <[email protected]>
  • Loading branch information
inouetakuya and wattanx authored May 6, 2024
1 parent 87607e6 commit e96b153
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const parseScript = (input: string, lang: "js" | "ts" = "js") => {
describe("convertPageMeta", () => {
describe("basic", () => {
const source = `<script>
import { defineComponent } from 'vue';
import { defineNuxtComponent } from '#imports';
export default defineComponent({
export default defineNuxtComponent({
name: 'HelloWorld',
layout: 'test-layout',
middleware: 'test-middleware',
Expand All @@ -60,9 +60,9 @@ describe("convertPageMeta", () => {

describe("when middleware is array", () => {
const source = `<script>
import { defineComponent } from 'vue';
import { defineNuxtComponent } from '#imports';
export default defineComponent({
export default defineNuxtComponent({
name: 'HelloWorld',
layout: 'test-layout',
middleware: ['test-middleware-1', 'test-middleware-2'],
Expand Down

0 comments on commit e96b153

Please sign in to comment.