@reporters/silent 1.0.0
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/CHANGELOG.md +8 -0
- package/README.md +22 -0
- package/index.js +5 -0
- package/package.json +22 -0
- package/tests/index.test.js +7 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/@reporters/github) 
|
|
2
|
+
# Silent Reporter
|
|
3
|
+
A Silent reporter for `node:test`, in case you don't want to see any output.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev @reporters/silent
|
|
9
|
+
```
|
|
10
|
+
or
|
|
11
|
+
```bash
|
|
12
|
+
yarn add --dev @reporters/silent
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node --test --test-reporter=@reporters/silent
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
the output will be empty, but the tests will still run,
|
|
22
|
+
and the exit code will be 0 if all tests pass, and 1 if any test fails.
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reporters/silent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A silent reporter for `node:test`",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node:test",
|
|
7
|
+
"test",
|
|
8
|
+
"reporter",
|
|
9
|
+
"reporters"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "../../prebuilt --test"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/MoLow/reporters/issues"
|
|
16
|
+
},
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"homepage": "https://github.com/MoLow/reporters/tree/main/packages/silent",
|
|
19
|
+
"repository": "https://github.com/MoLow/reporters.git",
|
|
20
|
+
"author": "Moshe Atlow",
|
|
21
|
+
"license": "MIT"
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const { spawnSync } = require('child_process');
|
|
2
|
+
const assert = require('assert');
|
|
3
|
+
|
|
4
|
+
const child = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example']);
|
|
5
|
+
|
|
6
|
+
assert.strictEqual(child.stderr?.toString(), '');
|
|
7
|
+
assert.strictEqual(child.stdout?.toString(), '');
|