Skip to content

Commit

Permalink
feat: testSetup clears project so tests can have different project co…
Browse files Browse the repository at this point in the history
…nfigs
  • Loading branch information
mshanemc committed Mar 19, 2023
1 parent 1369791 commit d709d24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/testSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ export const restoreContext = (testContext: TestContext): void => {
testContext.configStubs = {};
// Give each test run a clean StateAggregator
StateAggregator.clearInstance();
// @ts-expect-error accessing a private property
SfProject.instances.clear();
// Allow each test to have their own config aggregator
// @ts-ignore clear for testing.
delete ConfigAggregator.instance;
Expand Down

0 comments on commit d709d24

Please sign in to comment.