@reporters/bail 1.1.4 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
module.exports = async function* bail(source) {
|
|
4
4
|
for await (const event of source) {
|
|
5
5
|
if (event.type === 'test:fail') {
|
|
6
|
+
/* c8 ignore start */
|
|
6
7
|
yield `\n\u001b[31m✖ Bailing on failed test: ${event.data.name}\u001b[0m\n`;
|
|
7
8
|
throw new Error('Bail');
|
|
8
9
|
}
|
|
10
|
+
/* c8 ignore stop */
|
|
9
11
|
}
|
|
10
12
|
};
|