nuxt-spec 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +5 -5
- package/test/nuxt-e2e.test.ts +4 -7
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Aside from being "forked" and used as you seem fit, `nuxt-spec` is also availabl
|
|
|
15
15
|
|
|
16
16
|
1) Add following dependency into your `package.json`:
|
|
17
17
|
```
|
|
18
|
-
"nuxt-spec": "0.0.
|
|
18
|
+
"nuxt-spec": "0.0.3"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
2) Add following section into your `nuxt.config.ts`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-spec",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Test-pack layer for Nuxt Applications",
|
|
5
5
|
"repository": "github:AloisSeckar/nuxt-spec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@nuxt/test-utils": "3.15.4",
|
|
21
21
|
"@vue/test-utils": "2.4.6",
|
|
22
|
-
"happy-dom": "16.
|
|
23
|
-
"playwright-core": "1.50.
|
|
24
|
-
"vitest": "3.0.
|
|
22
|
+
"happy-dom": "16.8.1",
|
|
23
|
+
"playwright-core": "1.50.1",
|
|
24
|
+
"vitest": "3.0.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@nuxt/eslint": "0.7.6",
|
|
28
28
|
"nuxt": "3.15.4",
|
|
29
29
|
"typescript": "latest"
|
|
30
30
|
},
|
|
31
|
-
"packageManager": "pnpm@9.15.
|
|
31
|
+
"packageManager": "pnpm@9.15.5"
|
|
32
32
|
}
|
package/test/nuxt-e2e.test.ts
CHANGED
|
@@ -4,11 +4,7 @@ import { describe, expect, test } from 'vitest'
|
|
|
4
4
|
describe('NuxtTestComponent E2E test', async () => {
|
|
5
5
|
// setup app.vue in headless browser
|
|
6
6
|
await setup()
|
|
7
|
-
|
|
8
|
-
// TODO tests broken
|
|
9
|
-
// Cannot find module '<local_path>\.nuxt\test\83opp2\output\server\node_modules\vue\server-renderer\index.mjs'
|
|
10
|
-
// imported from <local_path>\.nuxt\test\83opp2\output\server\chunks\routes\renderer.mjs
|
|
11
|
-
|
|
7
|
+
|
|
12
8
|
test('component renders in browser', async () => {
|
|
13
9
|
// fetch for the rendered value
|
|
14
10
|
const html = await $fetch('/')
|
|
@@ -16,9 +12,10 @@ describe('NuxtTestComponent E2E test', async () => {
|
|
|
16
12
|
})
|
|
17
13
|
|
|
18
14
|
test('with playwright', async () => {
|
|
15
|
+
// render page in headless browser
|
|
19
16
|
const page = await createPage()
|
|
20
17
|
await page.goto(url('/'), { waitUntil: 'hydration' })
|
|
21
|
-
const
|
|
22
|
-
|
|
18
|
+
const hasText = await page.getByText('nuxt-spec').isVisible()
|
|
19
|
+
expect(hasText).toBeTruthy()
|
|
23
20
|
})
|
|
24
21
|
})
|