Skip to content

Commit 3cbe657

Browse files
committed
chore: log error in test
1 parent 269c4a6 commit 3cbe657

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/index.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ test('main', async () => {
2222
]
2323
})
2424
const stats = await util.promisify(compiler.run.bind(compiler))()
25-
expect(stats.hasErrors()).toBe(false)
26-
expect(stats.hasWarnings()).toBe(false)
25+
if (stats.hasErrors()) {
26+
throw new Error(stats.toString('errors-only'))
27+
}
2728
})

0 commit comments

Comments
 (0)