@reporters/bail 1.0.0 → 1.1.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/README.md CHANGED
@@ -22,3 +22,6 @@ node --test \
22
22
  --test-reporter=spec --test-reporter-destination=stdout
23
23
  ```
24
24
 
25
+ ### Example
26
+
27
+ ![cli](https://raw.githubusercontent.com/MoLow/reporters/dbc82f3e738ac40cc75eafc15946f712ccad9c99/packages/bail/assets/cli.gif)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporters/bail",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "A Bail library for `node:test`",
5
5
  "keywords": [
6
6
  "node:test",
@@ -8,6 +8,9 @@
8
8
  "reporter",
9
9
  "reporters"
10
10
  ],
11
+ "files": [
12
+ "./index.js"
13
+ ],
11
14
  "scripts": {
12
15
  "test": "node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=../github/index.js --test-reporter-destination=stdout --test"
13
16
  },
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.0.0 (2023-06-05)
4
-
5
-
6
- ### Features
7
-
8
- * add @reporters/bail package ([9a2ca5c](https://github.com/MoLow/reporters/commit/9a2ca5c98e029e6b73238adfb0f6e68da9011d87))
@@ -1,7 +0,0 @@
1
- const { describe, test } = require('node:test');
2
- const assert = require('node:assert');
3
-
4
- describe('enforce no concurrent tests', { concurrent: false }, () => {
5
- test('fail', async () => assert.fail());
6
- test('dont run', async () => {});
7
- });
@@ -1,3 +0,0 @@
1
- const { test } = require('node:test');
2
-
3
- test('pass');
@@ -1,24 +0,0 @@
1
- const { test } = require('node:test');
2
- const { spawnSync } = require('child_process');
3
- const assert = require('assert');
4
-
5
- test('pass should not interfere with passing test', () => {
6
- const child = spawnSync(process.execPath, [
7
- '--test-reporter', 'dot', '--test-reporter-destination', 'stdout',
8
- '--test-reporter', './index.js', '--test-reporter-destination', 'stdout', 'tests/fixtures/pass.js',
9
- ], { env: {} });
10
- assert.strictEqual(child.stderr?.toString(), '');
11
- assert.strictEqual(child.stdout?.toString(), '.\n');
12
- assert.strictEqual(child.status, 0);
13
- });
14
-
15
- test('fail should stop after failed test', () => {
16
- const child = spawnSync(process.execPath, [
17
- '--test-reporter', 'dot', '--test-reporter-destination', 'stdout',
18
- '--test-reporter', './index.js', '--test-reporter-destination', 'stdout',
19
- 'tests/fixtures/fail.js', 'tests/fixtures/pass.js',
20
- ], { env: {} });
21
- assert.strictEqual(child.stderr?.toString(), '');
22
- assert.strictEqual(child.stdout?.toString(), 'X\n\x1B[31m✖ Bailing on failed test: fail\x1B[0m\n');
23
- assert.strictEqual(child.status, 1);
24
- });