I m just getting started with Playwright but I m getting confused between the cli commands used to run tests, e.g. npx playwright test
and commands that you add to your package.json
, for example...
{
"scripts": {
"pretest": "tsc --incremental -p tests/tsconfig.json",
"test": "playwright test -c tests-out"
}
}
我知道,我可以在这里操作<代码>npm test,但为什么这项工作在文字中进行,而不是在我简单操作<代码>时,在终点站进行权宜测试――c-out? 我刚刚获得<代码>。 不明指挥:“权”代码。
<代码>npx 操守测试的指令和wright test
之间的关系如何?
另外,为什么<代码>-c指的是此处的输出目录,而现在的目录是<代码>npxwright test,这是指一个组合文件?
我请求的理由是,在打字器项目中,我正在对以下文字进行界定......
"e2e-playwright-build": "cd apps/playwright-e2e && tsc",
"e2e-playwright": "npm run e2e-playwright-build && cd apps/playwright-e2e/src/tests && playwright test -c tests-out --config=../../tests-out/apps/playwright-e2e/src/tests/configs/playwright.config.js --grep-invert "@example|@visual|@access|@failfast"",
这些指挥对我的要求过于宽泛,但我想根据我自己的指挥进行具体测试,然而,在我试图操作<条码>npx 操控<>时。 我刚刚到来。
Unexpected current working directory - C:Tribal ribal.edge.uimodule ribal.edge.uiappsplaywright-e2e ests-out
还有一些错误。 我的双管齐下的结构如下......
├── apps
│ ├── playwright-e2e
│ ├── src
├── node_modules
├── package.json
├── package-lock.json
└── .gitignore