From db4bde3baffcfa1f95d490186a280445fabbfdf1 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Fri, 21 Apr 2023 14:48:34 -0600 Subject: [PATCH] fix: ensure deleted version is not listed (#311) --- test/commands/package/packageVersion.nut.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/commands/package/packageVersion.nut.ts b/test/commands/package/packageVersion.nut.ts index e0434ecd..ba1928f5 100644 --- a/test/commands/package/packageVersion.nut.ts +++ b/test/commands/package/packageVersion.nut.ts @@ -386,11 +386,15 @@ describe('package:version:*', () => { it('will delete a package (json)', () => { const id = deletableVersionIds.pop(); + expect(id).to.be.a('string').with.length.greaterThanOrEqual(15); const command = `package:version:delete -p ${id} --json`; const result = execCmd<[PackageSaveResult]>(command, { ensureExitCode: 0 }).jsonOutput?.result; expect(result).to.have.property('success', true); expect(result).to.have.property('id', id); expect(result).to.have.property('errors'); + const listCommand = `package:version:list -v ${session.hubOrg.username} -p ${packageId} --json`; + const output = execCmd(listCommand, { ensureExitCode: 0 }).jsonOutput?.result; + expect(output?.some((pv) => pv.SubscriberPackageVersionId === id)).to.be.false; }); it('will delete a package (human)', () => {