fix: don't use commas for jest test files

Signed-off-by: Aramis Sennyey <aramiss@spotify.com>
This commit is contained in:
Aramis Sennyey
2023-12-01 14:01:52 -05:00
parent df4a219c52
commit f49e2372d0
4 changed files with 9 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed a bug where `schema openapi init` created an invalid test command.
@@ -35,7 +35,7 @@ async function init(directoryPath: string) {
);
}
const opticConfigFilePath = join(directoryPath, 'optic.yml');
if (!(await fs.pathExists(opticConfigFilePath))) {
if (await fs.pathExists(opticConfigFilePath)) {
throw new Error(`This directory already has an optic.yml file. Exiting.`);
}
await fs.writeFile(
@@ -56,7 +56,7 @@ capture:
# 🔧 Specify a command that will generate traffic
command: yarn backstage-cli package test --no-watch ${ROUTER_TEST_PATHS.map(
e => `"${e}"`,
).join(',')}
).join(' ')}
`,
);
if (await cliPaths.resolveTargetRoot('node_modules/.bin/prettier')) {
+1 -1
View File
@@ -12,4 +12,4 @@ capture:
# ️ Requests should be sent to the Optic proxy, the address of which is injected into 'run.command's env as OPTIC_PROXY (or the value of 'run.proxy_variable').
run:
# 🔧 Specify a command that will generate traffic
command: yarn backstage-cli package test --no-watch src/service/router.test.ts src/service/createRouter.test.ts
command: yarn backstage-cli package test --no-watch "src/service/router.test.ts" "src/service/createRouter.test.ts"
+1 -1
View File
@@ -12,4 +12,4 @@ capture:
# ️ Requests should be sent to the Optic proxy, the address of which is injected into 'run.command's env as OPTIC_PROXY (or the value of 'run.proxy_variable').
run:
# 🔧 Specify a command that will generate traffic
command: yarn backstage-cli package test --no-watch src/service/router.test.ts src/service/createRouter.test.ts
command: yarn backstage-cli package test --no-watch "src/service/router.test.ts" "src/service/createRouter.test.ts"