Skip to content

Commit d1c0d73

Browse files
committed
test: fix E2E_COMMAND env
1 parent 3daf0fc commit d1c0d73

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ After starting a dev server or a preview server, you can run e2e tests in anothe
101101

102102
```bash
103103
# open Cypress GUI
104-
pnpm cy:open
104+
pnpm cy:open:dev
105+
pnpm cy:open:build
105106
# or, run tests in command line
106-
pnpm cy:run
107+
pnpm cy:run:dev
108+
pnpm cy:run:build
107109
```
108110

109111
If you don't want to start a server and run tests in two different terminals, you can make use of the following commands:

CONTRIBUTING_zh.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ pnpm docs:serve
101101

102102
```bash
103103
# 启动 Cypress 图形界面
104-
pnpm cy:open
104+
pnpm cy:open:dev
105+
pnpm cy:open:build
105106
# 或者,直接在命令行中运行测试
106-
pnpm cy:run
107+
pnpm cy:run:dev
108+
pnpm cy:run:build
107109
```
108110

109111
如果你不想在两个不同终端内启动服务器和运行测试,你可以使用如下命令:

e2e/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"cy:open": "cypress open",
8-
"cy:run": "cypress run",
9-
"docs:build": "cross-env E2E_COMMAND=build vuepress build docs --clean-cache --clean-temp",
7+
"cy:open:build": "cross-env E2E_COMMAND=build cypress open",
8+
"cy:open:dev": "cross-env E2E_COMMAND=dev cypress open",
9+
"cy:run:build": "cross-env E2E_COMMAND=build cypress run",
10+
"cy:run:dev": "cross-env E2E_COMMAND=dev cypress run",
11+
"docs:build": "vuepress build docs --clean-cache --clean-temp",
1012
"docs:build-webpack": "cross-env E2E_BUNDLER=webpack pnpm docs:build",
1113
"docs:clean": "rimraf docs/.vuepress/.temp docs/.vuepress/.cache docs/.vuepress/dist",
12-
"docs:dev": "cross-env E2E_COMMAND=dev vuepress dev docs --clean-cache --clean-temp",
14+
"docs:dev": "vuepress dev docs --clean-cache --clean-temp",
1315
"docs:dev-webpack": "cross-env E2E_BUNDLER=webpack pnpm docs:dev",
1416
"docs:serve": "anywhere -s -h localhost -p 9080 -d docs/.vuepress/dist",
15-
"e2e:build": "pnpm docs:clean && pnpm docs:build && start-server-and-test docs:serve http-get://localhost:9080 cy:run",
16-
"e2e:dev": "pnpm docs:clean && start-server-and-test docs:dev http-get://127.0.0.1:9080 cy:run"
17+
"e2e:build": "pnpm docs:clean && pnpm docs:build && start-server-and-test docs:serve http-get://localhost:9080 cy:run:build",
18+
"e2e:dev": "pnpm docs:clean && start-server-and-test docs:dev http-get://127.0.0.1:9080 cy:run:dev"
1719
},
1820
"dependencies": {
1921
"@vuepress-e2e/conditional-exports": "file:./modules/conditional-exports",

0 commit comments

Comments
 (0)