Skip to content

Commit

Permalink
test: restructure test hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Jan 28, 2024
1 parent aaa4cde commit 54d5857
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/integration/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ describe('angular-prerender', () => {

await execAsync(`rm ${join(directory, `angular-prerender-${version}.tgz`)}`);

await rimraf(directory, { preserveRoot: false });
await rimraf(directory);
});

beforeEach(async function () {
before(async function () {
this.timeout(600000);

directory = env.CI ? await makeFakedTemporaryDirectory() : await mkdtempAsync(`${tmpdir()}${sep}`);
Expand Down Expand Up @@ -77,6 +77,10 @@ describe('angular-prerender', () => {

await execAsync('npm pack');
await execAsync(`mv ${join(cwd(), `angular-prerender-${version}.tgz`)} ${directory}`);
});

beforeEach(async function () {
this.timeout(600000);

await execAsync('git checkout .', { cwd: projectDirectory });
await execAsync('git clean --force', { cwd: projectDirectory });
Expand Down

0 comments on commit 54d5857

Please sign in to comment.