Skip to content

Commit

Permalink
fix: another cypress executor error fix and log removal
Browse files Browse the repository at this point in the history
  • Loading branch information
sampullman committed Mar 17, 2023
1 parent 2479a20 commit c7c4499
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"vite": "^4.1.4",
"vitepress": "^0.22.4"
}
}
}
16 changes: 5 additions & 11 deletions packages/vue3-vite/generators.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
{
"$schema": "http://json-schema.org/schema",
"name": "nx-vue3-vite",
"version": "0.23.8",
"version": "0.23.9",
"generators": {
"vue3-vite": {
"factory": "./src/generators/vue3-vite/generator",
"schema": "./src/generators/vue3-vite/schema.json",
"description": "vue3-vite generator",
"aliases": [
"app"
]
"aliases": ["app"]
},
"library": {
"factory": "./src/generators/library/generator",
"schema": "./src/generators/library/schema.json",
"description": "vue3-vite library generator",
"aliases": [
"lib"
]
"aliases": ["lib"]
},
"component": {
"factory": "./src/generators/component/generator",
"schema": "./src/generators/component/schema.json",
"description": "component generator",
"aliases": [
"c"
]
"aliases": ["c"]
},
"docs": {
"factory": "./src/generators/docs/generator",
Expand All @@ -38,4 +32,4 @@
"description": "vue3-vite cypress generator"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/vue3-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nx-vue3-vite",
"version": "0.23.8",
"version": "0.23.9",
"main": "src/index.js",
"generators": "./generators.json",
"executors": "./executors.json",
Expand All @@ -21,4 +21,4 @@
"vite",
"generator"
]
}
}
4 changes: 1 addition & 3 deletions packages/vue3-vite/src/executors/cypress/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,11 @@ async function runCypress(baseUrl: string, opts: CypressExecutorOptions) {
if (opts.headless) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result = (await Cypress.run(options)) as any;
delete result.runs;

const finished = result.status === 'finished';
const failures = finished ? 0 : result.totalFailed;
const failures = result.totalFailed ?? 0;
const message = finished ? '' : `, ${result.message}`;

logger.info(JSON.stringify(result));
logger.info(
`Cypress completed with status: ${result.status}${message} failed=${failures}`
);
Expand Down

0 comments on commit c7c4499

Please sign in to comment.