Skip to content

Commit

Permalink
Let Jest handle the thrown error
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Dec 5, 2023
1 parent 1d46f1f commit 2df45b9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,9 @@ afterAll(async () => {
it('should build the generated project', async () => {
process.chdir(generatedProjectRoot);

try {
let output = execSync('npx aunty build');
console.log(output.toString());
} catch (error) {
console.error(error.stdout.toString());
}
// Should throw an error on non-zero exit code
let output = execSync('npx aunty build');
console.log(output.toString());

const fileList = await fs.readdir(path.join(generatedProjectRoot, '.aunty/build'));

Expand Down

0 comments on commit 2df45b9

Please sign in to comment.