From 069ff4bb68bb2d3fec468c600b814d54d993bbb4 Mon Sep 17 00:00:00 2001 From: Shane McLaughlin Date: Fri, 15 Dec 2023 08:52:19 -0600 Subject: [PATCH] test: non-zero exitCodes (#842) --- package.json | 2 +- test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts | 2 +- test/nuts/seeds/deploy.metadata.source-dir.seed.ts | 2 +- yarn.lock | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c4fb0828..1b4536c8 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@oclif/plugin-command-snapshot": "^5.0.3", - "@salesforce/cli-plugins-testkit": "^5.1.0", + "@salesforce/cli-plugins-testkit": "^5.1.1", "@salesforce/dev-scripts": "^8.1.2", "@salesforce/plugin-command-reference": "^3.0.51", "@salesforce/plugin-source": "^2.11.4", diff --git a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts index feaab68a..2bc07131 100644 --- a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts @@ -52,7 +52,7 @@ context('deploy metadata --metadata-dir NUTs [name: %REPO_NAME%]', () => { } it('should throw an error if the directory does not exist', async () => { - const deploy = await testkit.deploy({ args: '--metadata-dir DOES_NOT_EXIST', exitCode: 1 }); + const deploy = await testkit.deploy({ args: '--metadata-dir DOES_NOT_EXIST', exitCode: 'nonZero' }); assert(deploy); testkit.expect.errorToHaveName(deploy, 'InvalidFlagPathError'); }); diff --git a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts index afc3ef5f..179bb337 100644 --- a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts @@ -46,7 +46,7 @@ context('deploy metadata --source-dir NUTs [name: %REPO_NAME%]', () => { } it('should throw an error if the directory does not exist', async () => { - const deploy = await testkit.deploy({ args: '--source-dir DOES_NOT_EXIST', exitCode: 1 }); + const deploy = await testkit.deploy({ args: '--source-dir DOES_NOT_EXIST', exitCode: 'nonZero' }); assert(deploy); testkit.expect.errorToHaveName(deploy, 'SfError'); }); diff --git a/yarn.lock b/yarn.lock index bcaa895f..72b068ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -976,12 +976,12 @@ istanbul-reports "^3.1.6" jsforce "^2.0.0-beta.29" -"@salesforce/cli-plugins-testkit@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.1.0.tgz#8d9caa22ea9e99879629206892afb26bcd540cef" - integrity sha512-P5tYlNqE87lX9Yp2aAsK75PICoAbmrSK3LEqiIVbtn75PN3OKiD1JEEX2ZDu+HWtO4/nxPtO4JFvX5j00EZGBA== +"@salesforce/cli-plugins-testkit@^5.1.0", "@salesforce/cli-plugins-testkit@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.1.1.tgz#73baef2d27abc6cbb11c82e2869a3b4b57ff342d" + integrity sha512-qllBs+dGYIMS7GrJfJaalJSNsNohDAiLLHOZXk8WL+aZ1dRGDaWTiS4gyZKPKgeahXuNPTBxDqNg7WajvfNcxg== dependencies: - "@salesforce/core" "^6.2.2" + "@salesforce/core" "^6.4.0" "@salesforce/kit" "^3.0.15" "@salesforce/ts-types" "^2.0.9" "@types/shelljs" "^0.8.15"