mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-29 17:58:08 +08:00
fix(ssr-testing): fix code (#7466)
This commit is contained in:
parent
84c0b6a37f
commit
120405aa72
@ -10,7 +10,7 @@
|
||||
"cz": "git-cz",
|
||||
"test": "vitest",
|
||||
"test:coverage": "vitest --coverage",
|
||||
"test:ssr": "rimraf ./ssr-testing/screenshots/* && vitest --config ./ssr-testing/vitest.config.ts",
|
||||
"test:ssr": "vitest --config ./ssr-testing/vitest.config.ts",
|
||||
"prepare:e2e": "if [ ! -d \"docs/.vitepress/dist\" ]; then pnpm run docs:build; fi;",
|
||||
"dev": "pnpm -C play dev",
|
||||
"gen": "bash ./scripts/gc.sh",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import path from 'path'
|
||||
import { createApp } from 'vue'
|
||||
import { renderToString } from '@vue/server-renderer'
|
||||
import { beforeAll, describe, expect, it } from 'vitest'
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
||||
import puppeteer from 'puppeteer'
|
||||
import glob from 'fast-glob'
|
||||
import ElementPlus, { ID_INJECTION_KEY } from '../dist/element-plus'
|
||||
@ -17,6 +17,10 @@ describe('Cypress Button', () => {
|
||||
browser = await puppeteer.launch()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
browser.close()
|
||||
})
|
||||
|
||||
describe('when initialized', () => {
|
||||
const demoPaths = glob
|
||||
.sync(`${demoRoot}/*.vue`)
|
||||
@ -58,6 +62,7 @@ describe('Cypress Button', () => {
|
||||
// path: path.join(testRoot, 'screenshots', screenshotPath),
|
||||
// fullPage: true,
|
||||
// })
|
||||
|
||||
await page.close()
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
|
@ -1,11 +1,12 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.node.json",
|
||||
"include": ["../packages/components/**/ssr/*.vue"],
|
||||
"include": ["../packages/components/**/ssr/*.vue", "**/*"],
|
||||
"compilerOptions": {
|
||||
"isolatedModules": false,
|
||||
"module": "ESNext",
|
||||
"target": "ES5",
|
||||
"lib": ["ES5", "DOM"],
|
||||
"jsx": "preserve"
|
||||
"jsx": "preserve",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user