[{"data":1,"prerenderedAt":677},["ShallowReactive",2],{"navigation_docs":3,"-guides-testing-a-phaser-canvas-in-nuxt":159,"-guides-testing-a-phaser-canvas-in-nuxt-surround":672},[4,29,57,76,100,124,152],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,12,16,20,24],{"title":5,"path":7,"stem":11},"1.getting-started\u002Findex",{"title":13,"path":14,"stem":15},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation",{"title":17,"path":18,"stem":19},"First Game","\u002Fgetting-started\u002Ffirst-game","1.getting-started\u002F2.first-game",{"title":21,"path":22,"stem":23},"SSR and Mounting","\u002Fgetting-started\u002Fssr-and-mounting","1.getting-started\u002F3.ssr-and-mounting",{"title":25,"path":26,"stem":27,"icon":28},"Skills","\u002Fgetting-started\u002Fskills","1.getting-started\u002F4.skills","i-lucide-sparkles",{"title":30,"icon":31,"path":32,"stem":33,"children":34},"Vue Guide","i-lucide-book-open","\u002Fvue-guide","2.vue-guide",[35,37,41,45,49,53],{"title":30,"path":32,"stem":36},"2.vue-guide\u002Findex",{"title":38,"path":39,"stem":40},"PhaserGame","\u002Fvue-guide\u002Fphaser-game","2.vue-guide\u002F1.phaser-game",{"title":42,"path":43,"stem":44},"Scenes","\u002Fvue-guide\u002Fscenes","2.vue-guide\u002F2.scenes",{"title":46,"path":47,"stem":48},"Primitives","\u002Fvue-guide\u002Fprimitives","2.vue-guide\u002F3.primitives",{"title":50,"path":51,"stem":52},"Composables and Bridge","\u002Fvue-guide\u002Fcomposables-and-bridge","2.vue-guide\u002F4.composables-and-bridge",{"title":54,"path":55,"stem":56},"Escape Hatches","\u002Fvue-guide\u002Fescape-hatches","2.vue-guide\u002F5.escape-hatches",{"title":58,"icon":59,"path":60,"stem":61,"children":62},"Nuxt Module","i-lucide-layers-3","\u002Fnuxt-module","3.nuxt-module",[63,65,68,72],{"title":58,"path":60,"stem":64},"3.nuxt-module\u002Findex",{"title":13,"path":66,"stem":67},"\u002Fnuxt-module\u002Finstallation","3.nuxt-module\u002F1.installation",{"title":69,"path":70,"stem":71},"Runtime Defaults","\u002Fnuxt-module\u002Fruntime-defaults","3.nuxt-module\u002F2.runtime-defaults",{"title":73,"path":74,"stem":75},"Client-only Wrapper","\u002Fnuxt-module\u002Fclient-only-wrapper","3.nuxt-module\u002F3.client-only-wrapper",{"title":77,"icon":78,"path":79,"stem":80,"children":81},"Examples","i-lucide-play-square","\u002Fexamples","4.examples",[82,84,88,92,96],{"title":77,"path":79,"stem":83},"4.examples\u002Findex",{"title":85,"path":86,"stem":87},"Minimal","\u002Fexamples\u002Fminimal","4.examples\u002F1.minimal",{"title":89,"path":90,"stem":91},"Imperative Escape Hatch","\u002Fexamples\u002Fimperative-escape-hatch","4.examples\u002F2.imperative-escape-hatch",{"title":93,"path":94,"stem":95},"Multi-scene","\u002Fexamples\u002Fmulti-scene","4.examples\u002F3.multi-scene",{"title":97,"path":98,"stem":99},"Nuxt Playground","\u002Fexamples\u002Fnuxt-playground","4.examples\u002F4.nuxt-playground",{"title":101,"icon":102,"path":103,"stem":104,"children":105},"API Reference","i-lucide-book-open-text","\u002Fapi-reference","5.api-reference",[106,108,112,116,120],{"title":101,"path":103,"stem":107},"5.api-reference\u002Findex",{"title":109,"path":110,"stem":111},"Vue Components","\u002Fapi-reference\u002Fvue-components","5.api-reference\u002F1.vue-components",{"title":113,"path":114,"stem":115},"Composables","\u002Fapi-reference\u002Fcomposables","5.api-reference\u002F2.composables",{"title":117,"path":118,"stem":119},"Types","\u002Fapi-reference\u002Ftypes","5.api-reference\u002F3.types",{"title":121,"path":122,"stem":123},"Nuxt Module Options","\u002Fapi-reference\u002Fnuxt-module-options","5.api-reference\u002F4.nuxt-module-options",{"title":125,"icon":126,"path":127,"stem":128,"children":129},"Guides","i-lucide-compass","\u002Fguides","6.guides",[130,132,136,140,144,148],{"title":125,"path":127,"stem":131},"6.guides\u002Findex",{"title":133,"path":134,"stem":135},"Performance","\u002Fguides\u002Fperformance","6.guides\u002F1.performance",{"title":137,"path":138,"stem":139},"Scene-first Design","\u002Fguides\u002Fscene-first-design","6.guides\u002F2.scene-first-design",{"title":141,"path":142,"stem":143},"Vue Reactivity vs Phaser Imperative Updates","\u002Fguides\u002Fvue-reactivity-vs-phaser-imperative-updates","6.guides\u002F3.vue-reactivity-vs-phaser-imperative-updates",{"title":145,"path":146,"stem":147},"Testing scene primitives in Vue","\u002Fguides\u002Ftesting-scene-primitives-in-vue","6.guides\u002F4.testing-scene-primitives-in-vue",{"title":149,"path":150,"stem":151},"Testing a Phaser canvas in Nuxt","\u002Fguides\u002Ftesting-a-phaser-canvas-in-nuxt","6.guides\u002F5.testing-a-phaser-canvas-in-nuxt",{"title":153,"path":154,"stem":155,"children":156,"icon":158},"Roadmap","\u002Froadmap","7.roadmap\u002Findex",[157],{"title":153,"path":154,"stem":155},"i-lucide-flag",{"id":160,"title":149,"body":161,"description":666,"extension":667,"links":668,"meta":669,"navigation":325,"path":150,"seo":670,"stem":151,"__hash__":671},"docs\u002F6.guides\u002F5.testing-a-phaser-canvas-in-nuxt.md",{"type":162,"value":163,"toc":659},"minimark",[164,172,177,243,247,530,534,545,609,613,616,631,634,638,641,652,655],[165,166,167,171],"p",{},[168,169,170],"code",{},"@onmax\u002Fnuxt-phaser\u002Ftesting"," stays thin on purpose. It wraps Nuxt's official runtime helpers instead of inventing a second test system.",[173,174,176],"h2",{"id":175},"install-the-testing-entrypoint","Install the testing entrypoint",[178,179,184],"pre",{"className":180,"code":181,"language":182,"meta":183,"style":183},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {\n  mountSuspendedWithPhaser,\n  renderSuspendedWithPhaser,\n  withPhaserRuntimeConfig,\n} from '@onmax\u002Fnuxt-phaser\u002Ftesting'\n","ts","",[168,185,186,199,209,217,225],{"__ignoreMap":183},[187,188,191,195],"span",{"class":189,"line":190},"line",1,[187,192,194],{"class":193},"s7zQu","import",[187,196,198],{"class":197},"sMK4o"," {\n",[187,200,202,206],{"class":189,"line":201},2,[187,203,205],{"class":204},"sTEyZ","  mountSuspendedWithPhaser",[187,207,208],{"class":197},",\n",[187,210,212,215],{"class":189,"line":211},3,[187,213,214],{"class":204},"  renderSuspendedWithPhaser",[187,216,208],{"class":197},[187,218,220,223],{"class":189,"line":219},4,[187,221,222],{"class":204},"  withPhaserRuntimeConfig",[187,224,208],{"class":197},[187,226,228,231,234,237,240],{"class":189,"line":227},5,[187,229,230],{"class":197},"}",[187,232,233],{"class":193}," from",[187,235,236],{"class":197}," '",[187,238,170],{"class":239},"sfazB",[187,241,242],{"class":197},"'\n",[173,244,246],{"id":245},"runtime-test-example","Runtime test example",[178,248,250],{"className":180,"code":249,"language":182,"meta":183,"style":183},"import { describe, expect, it } from 'vitest'\nimport { mountSuspendedWithPhaser } from '@onmax\u002Fnuxt-phaser\u002Ftesting'\nimport NuxtPhaserGame from '#components\u002FNuxtPhaserGame'\n\ndescribe('NuxtPhaserGame', () => {\n  it('mounts with the shared fake runtime', async () => {\n    const wrapper = await mountSuspendedWithPhaser(NuxtPhaserGame, {\n      attrs: {\n        width: 320,\n        height: 180,\n      },\n    })\n\n    expect(wrapper.find('.phaser-game-host').exists()).toBe(true)\n  })\n})\n",[168,251,252,285,304,321,327,355,382,407,418,432,445,451,460,465,515,523],{"__ignoreMap":183},[187,253,254,256,259,262,265,268,270,273,276,278,280,283],{"class":189,"line":190},[187,255,194],{"class":193},[187,257,258],{"class":197}," {",[187,260,261],{"class":204}," describe",[187,263,264],{"class":197},",",[187,266,267],{"class":204}," expect",[187,269,264],{"class":197},[187,271,272],{"class":204}," it",[187,274,275],{"class":197}," }",[187,277,233],{"class":193},[187,279,236],{"class":197},[187,281,282],{"class":239},"vitest",[187,284,242],{"class":197},[187,286,287,289,291,294,296,298,300,302],{"class":189,"line":201},[187,288,194],{"class":193},[187,290,258],{"class":197},[187,292,293],{"class":204}," mountSuspendedWithPhaser",[187,295,275],{"class":197},[187,297,233],{"class":193},[187,299,236],{"class":197},[187,301,170],{"class":239},[187,303,242],{"class":197},[187,305,306,308,311,314,316,319],{"class":189,"line":211},[187,307,194],{"class":193},[187,309,310],{"class":204}," NuxtPhaserGame ",[187,312,313],{"class":193},"from",[187,315,236],{"class":197},[187,317,318],{"class":239},"#components\u002FNuxtPhaserGame",[187,320,242],{"class":197},[187,322,323],{"class":189,"line":219},[187,324,326],{"emptyLinePlaceholder":325},true,"\n",[187,328,329,333,336,339,342,344,346,349,353],{"class":189,"line":227},[187,330,332],{"class":331},"s2Zo4","describe",[187,334,335],{"class":204},"(",[187,337,338],{"class":197},"'",[187,340,341],{"class":239},"NuxtPhaserGame",[187,343,338],{"class":197},[187,345,264],{"class":197},[187,347,348],{"class":197}," ()",[187,350,352],{"class":351},"spNyl"," =>",[187,354,198],{"class":197},[187,356,358,361,364,366,369,371,373,376,378,380],{"class":189,"line":357},6,[187,359,360],{"class":331},"  it",[187,362,335],{"class":363},"swJcz",[187,365,338],{"class":197},[187,367,368],{"class":239},"mounts with the shared fake runtime",[187,370,338],{"class":197},[187,372,264],{"class":197},[187,374,375],{"class":351}," async",[187,377,348],{"class":197},[187,379,352],{"class":351},[187,381,198],{"class":197},[187,383,385,388,391,394,397,399,401,403,405],{"class":189,"line":384},7,[187,386,387],{"class":351},"    const",[187,389,390],{"class":204}," wrapper",[187,392,393],{"class":197}," =",[187,395,396],{"class":193}," await",[187,398,293],{"class":331},[187,400,335],{"class":363},[187,402,341],{"class":204},[187,404,264],{"class":197},[187,406,198],{"class":197},[187,408,410,413,416],{"class":189,"line":409},8,[187,411,412],{"class":363},"      attrs",[187,414,415],{"class":197},":",[187,417,198],{"class":197},[187,419,421,424,426,430],{"class":189,"line":420},9,[187,422,423],{"class":363},"        width",[187,425,415],{"class":197},[187,427,429],{"class":428},"sbssI"," 320",[187,431,208],{"class":197},[187,433,435,438,440,443],{"class":189,"line":434},10,[187,436,437],{"class":363},"        height",[187,439,415],{"class":197},[187,441,442],{"class":428}," 180",[187,444,208],{"class":197},[187,446,448],{"class":189,"line":447},11,[187,449,450],{"class":197},"      },\n",[187,452,454,457],{"class":189,"line":453},12,[187,455,456],{"class":197},"    }",[187,458,459],{"class":363},")\n",[187,461,463],{"class":189,"line":462},13,[187,464,326],{"emptyLinePlaceholder":325},[187,466,468,471,473,476,479,482,484,486,489,491,494,496,499,502,504,507,509,513],{"class":189,"line":467},14,[187,469,470],{"class":331},"    expect",[187,472,335],{"class":363},[187,474,475],{"class":204},"wrapper",[187,477,478],{"class":197},".",[187,480,481],{"class":331},"find",[187,483,335],{"class":363},[187,485,338],{"class":197},[187,487,488],{"class":239},".phaser-game-host",[187,490,338],{"class":197},[187,492,493],{"class":363},")",[187,495,478],{"class":197},[187,497,498],{"class":331},"exists",[187,500,501],{"class":363},"())",[187,503,478],{"class":197},[187,505,506],{"class":331},"toBe",[187,508,335],{"class":363},[187,510,512],{"class":511},"sfNiH","true",[187,514,459],{"class":363},[187,516,518,521],{"class":189,"line":517},15,[187,519,520],{"class":197},"  }",[187,522,459],{"class":363},[187,524,526,528],{"class":189,"line":525},16,[187,527,230],{"class":197},[187,529,459],{"class":204},[173,531,533],{"id":532},"runtime-config-helper","Runtime config helper",[165,535,536,537,540,541,544],{},"Use ",[168,538,539],{},"withPhaserRuntimeConfig()"," when a test needs the resolved ",[168,542,543],{},"runtimeConfig.public.phaser"," shape without booting the whole module:",[178,546,548],{"className":180,"code":547,"language":182,"meta":183,"style":183},"import { withPhaserRuntimeConfig } from '@onmax\u002Fnuxt-phaser\u002Ftesting'\n\nconst runtimeConfig = withPhaserRuntimeConfig({\n  clientOnly: false,\n})\n",[168,549,550,569,573,591,603],{"__ignoreMap":183},[187,551,552,554,556,559,561,563,565,567],{"class":189,"line":190},[187,553,194],{"class":193},[187,555,258],{"class":197},[187,557,558],{"class":204}," withPhaserRuntimeConfig",[187,560,275],{"class":197},[187,562,233],{"class":193},[187,564,236],{"class":197},[187,566,170],{"class":239},[187,568,242],{"class":197},[187,570,571],{"class":189,"line":201},[187,572,326],{"emptyLinePlaceholder":325},[187,574,575,578,581,584,586,588],{"class":189,"line":211},[187,576,577],{"class":351},"const",[187,579,580],{"class":204}," runtimeConfig ",[187,582,583],{"class":197},"=",[187,585,558],{"class":331},[187,587,335],{"class":204},[187,589,590],{"class":197},"{\n",[187,592,593,596,598,601],{"class":189,"line":219},[187,594,595],{"class":363},"  clientOnly",[187,597,415],{"class":197},[187,599,600],{"class":511}," false",[187,602,208],{"class":197},[187,604,605,607],{"class":189,"line":227},[187,606,230],{"class":197},[187,608,459],{"class":204},[173,610,612],{"id":611},"browser-backed-smoke-tests","Browser-backed smoke tests",[165,614,615],{},"Use Vitest Browser Mode for a narrow slice of tests:",[617,618,619,623,626],"ul",{},[620,621,622],"li",{},"real canvas mount",[620,624,625],{},"keyboard and pointer plumbing",[620,627,628,630],{},[168,629,341],{}," client-only boundaries",[165,632,633],{},"Keep these tests small. They should prove browser behavior, not gameplay.",[173,635,637],{"id":636},"end-to-end-tests","End-to-end tests",[165,639,640],{},"Keep Playwright as the final layer for:",[617,642,643,646,649],{},[620,644,645],{},"full gameplay loops",[620,647,648],{},"claim and reward flows",[620,650,651],{},"cross-page and network-backed scenarios",[165,653,654],{},"The Nuxt testing entrypoint is the mid-tier layer between pure unit tests and real end-to-end tests.",[656,657,658],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":183,"searchDepth":201,"depth":201,"links":660},[661,662,663,664,665],{"id":175,"depth":201,"text":176},{"id":245,"depth":201,"text":246},{"id":532,"depth":201,"text":533},{"id":611,"depth":201,"text":612},{"id":636,"depth":201,"text":637},"Combine Nuxt runtime helpers, the shared fake Phaser runtime, and browser-mode smoke tests without replacing Nuxt test-utils.","md",null,{},{"title":149,"description":666},"IPYJX00o5ngNXZ_xMZPR7x5eX7zV_gD4IzYzZjemWUc",[673,675],{"title":145,"path":146,"stem":147,"description":674,"children":-1},"Use the fake Phaser runtime and the Vue mount helper to test scene wiring without a real renderer.",{"title":153,"path":154,"stem":155,"description":676,"children":-1},"See what the alpha intentionally leaves for later versions.",1777965862933]