Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 15a2aa2

Browse files
committed
test(nuxt): update nuxt tests
1 parent ada2caa commit 15a2aa2

File tree

3 files changed

+65
-26
lines changed

3 files changed

+65
-26
lines changed

modules/nuxt/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"@emotion/css": "^11.10.5",
3232
"@emotion/server": "^11.10.0",
3333
"@nuxtjs/emotion": "1.0.0",
34-
"unbuild": "^1.1.1"
34+
"unbuild": "^1.1.1",
35+
"vitest": "^0.18.0"
3536
},
3637
"peerDependencies": {
3738
"vue": "^3.1.4"
@@ -43,7 +44,7 @@
4344
"@nuxt/kit": "^3.0.0",
4445
"@nuxt/module-builder": "^0.2.1",
4546
"@nuxt/schema": "^3.0.0",
46-
"@nuxt/test-utils": "^3.0.0",
47+
"@nuxt/test-utils": "^3.1.1",
4748
"@nuxtjs/eslint-config-typescript": "^12.0.0",
4849
"nuxt": "^3.0.0",
4950
"vue": "^3.2.37"

modules/nuxt/test/basic.test.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import { fileURLToPath } from "url"
2-
import { setup, $fetch } from "@nuxt/test-utils"
3-
describe("nuxt emotion ssr", async () => {
4-
await setup({
5-
rootDir: fileURLToPath(new URL("../playground", import.meta.url)),
6-
})
7-
it("renders the index page", async () => {
8-
const html = await $fetch("/")
9-
expect(html).toContain("<style data-emotion")
10-
expect(html).toContain("<script data-emotion")
11-
expect(html).toContain("window.$emotionSSRIds")
12-
13-
// Removed because the nuxt build entries product difference SSR output
14-
// for each test run so it doesn't make sense to run snapshot tests.
15-
// expect(html).toMatchSnapshot()
16-
})
2+
// import { setup, $fetch } from "@nuxt/test-utils"
3+
it.todo("installs module and binds chakra config")
4+
it.todo("installs plugin")
5+
it.todo("detects and renders color mode based on cookie storage")
6+
describe("nuxt chakra ssr", async () => {
7+
// await setup({
8+
// rootDir: fileURLToPath(new URL("../playground", import.meta.url)),
9+
// })
10+
// it("renders the index page", async () => {
11+
// const html = await $fetch("/")
12+
// expect(html).toContain("<style data-emotion")
13+
// expect(html).toContain("<script data-emotion")
14+
// expect(html).toContain("window.$emotionSSRIds")
15+
// // Removed because the nuxt build entries product difference SSR output
16+
// // for each test run so it doesn't make sense to run snapshot tests.
17+
// // expect(html).toMatchSnapshot()
18+
// })
1719
})

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)