Skip to content

Commit

Permalink
test: fix version gating e2e test deletion (#8156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Hajdrik authored Sep 10, 2021
1 parent b97adaa commit c032a88
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type VersionGatingMetadata = {

describe('version gating', () => {
let projRoot: string;
let projectInitialized = false;
const projName = 'versiongating';

// Extreme version numbers for testing purposes
Expand Down Expand Up @@ -56,7 +57,10 @@ describe('version gating', () => {
});

afterEach(async () => {
await deleteProject(projRoot);
if (projectInitialized) {
await deleteProject(projRoot);
}

deleteProjectDir(projRoot);
});

Expand All @@ -72,6 +76,7 @@ describe('version gating', () => {
updateVersionInPackageJson(baseCLIVersion, baseMinimumCLIVersion);

await initJSProjectWithProfile(projRoot, { name: projName });
projectInitialized = true;

const meta = stateManager.getMeta(projRoot);

Expand Down

0 comments on commit c032a88

Please sign in to comment.