Merge pull request #21694 from backstage/fix-bugs-in-init
fix: don't use commas for jest test files
This commit is contained in:
@@ -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')) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user