Skip to content

Commit

Permalink
fix: ensure deleted version is not listed (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel authored Apr 21, 2023
1 parent 49ba17a commit db4bde3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/commands/package/packageVersion.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<PackageVersionListCommandResult>(listCommand, { ensureExitCode: 0 }).jsonOutput?.result;
expect(output?.some((pv) => pv.SubscriberPackageVersionId === id)).to.be.false;
});

it('will delete a package (human)', () => {
Expand Down

0 comments on commit db4bde3

Please sign in to comment.