Skip to content

Commit

Permalink
fix: remove PackageInfo when the expectation is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Apr 17, 2024
1 parent 73385a9 commit 4417a25
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ export const JsonDataCopy: ExpectationHandlerGenericWorker = {
}

try {
await lookupTarget.handle.removePackage('expectation removed')
if (isCorePackageInfoAccessorHandle(lookupTarget.handle)) {
await lookupTarget.handle.removePackageInfo(PackageInfoType.JSON, exp)
} else {
await lookupTarget.handle.removePackage('expectation removed')
}
} catch (err) {
return {
removed: false,
Expand Down

0 comments on commit 4417a25

Please sign in to comment.