open-index/open-npm huggingface dataset:
npm package: @reporters/bail
Description: A Bail library for `node:test`
Author: Moshe Atlow
Latest version: 1.3.1

[![npm version](https://img.shields.io/npm/v/@reporters/bail)](https://www.npmjs.com/package/@reporters/bail) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# `node:test` Bail on failure
A package to bail on the first test failure of a test run
using node built in test runner.

## Installation

```bash
npm install --save-dev @reporters/bail
```
or
```bash
yarn add --dev @reporters/bail
```

## Usage

```bash
node --test \
  --test-reporter=@reporters/bail --test-reporter-destination=stderr \
  --test-reporter=spec --test-reporter-destination=stdout
```

### Example

![cli](https://raw.githubusercontent.com/MoLow/reporters/dbc82f3e738ac40cc75eafc15946f712ccad9c99/packages/bail/assets/cli.gif)
npm package: @reporters/gh
Description: A github actions reporter for `node:test`
Author: Moshe Atlow
Latest version: 1.3.0

[![npm version](https://img.shields.io/npm/v/@reporters/gh)](https://www.npmjs.com/package/@reporters/gh) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Github Actions Reporter
A Github actions reporter for `node:test`
 
## Installation

```bash
npm install --save-dev @reporters/gh
```
or
```bash
yarn add --dev @reporters/gh
```

## Usage

```yaml
# .github/workflows/test.yml
- name: Run tests
  run: node --test --test-reporter=@reporters/gh
```

## Result

when test failed, annotations will be added inside the github UI, with corresponding errors and diagnostics.
see [example run](https://github.com/MoLow/reporters/actions/runs/5607828636):

#### Inline annotations

<img width="810" alt="Inline Annotation" src="https://user-images.githubusercontent.com/8221854/254798653-0c06278e-696b-42eb-8275-364b7eb3133b.png">

additionally, Annotations and summary will be added to the summary of the test run.

#### Annotations

<img width="810" alt="Annotation" src="https://user-images.githubusercontent.com/8221854/254798495-38c2a8ea-c9e0-4e87-a13e-677826b72192.png">

#### Summary
<img width="815" alt="Summary" src="https://github.com/MoLow/reporters/assets/8221854/8934f5bb-3342-430c-9ae0-3c608a40c9f0">
npm package: @reporters/github
Description: A github actions reporter for `node:test`
Author: Moshe Atlow
Latest version: 1.12.0

[![npm version](https://img.shields.io/npm/v/@reporters/github)](https://www.npmjs.com/package/@reporters/github) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Github Actions Reporter
A Github actions reporter for `node:test`
 
## Installation

```bash
npm install --save-dev @reporters/github
```
or
```bash
yarn add --dev @reporters/github
```

## Usage

```yaml
# .github/workflows/test.yml
- name: Run tests
  run: node --test \
    --test-reporter=@reporters/github --test-reporter-destination=stdout \
    --test-reporter=spec --test-reporter-destination=stdout
```

## Result

when test failed, annotations will be added inside the github UI, with corresponding errors and diagnostics.
see [example run](https://github.com/MoLow/reporters/actions/runs/5607828636):

#### Inline annotations

<img width="810" alt="Inline Annotation" src="https://user-images.githubusercontent.com/8221854/254798653-0c06278e-696b-42eb-8275-364b7eb3133b.png">

additionally, Annotations and summary will be added to the summary of the test run.

#### Annotations

<img width="810" alt="Annotation" src="https://user-images.githubusercontent.com/8221854/254798495-38c2a8ea-c9e0-4e87-a13e-677826b72192.png">

#### Summary
<img width="815" alt="Summary" src="https://github.com/MoLow/reporters/assets/8221854/8934f5bb-3342-430c-9ae0-3c608a40c9f0">
npm package: @reporters/junit
Description: A jUnit reporter for `node:test`
Author: Moshe Atlow
Latest version: 1.6.0

[![npm version](https://img.shields.io/npm/v/@reporters/junit)](https://www.npmjs.com/package/@reporters/junit) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Junit Reporter
A Junit reporter for `node:test`.
intended for use with major CI tools like Jenkins, CircleCI, etc that consume Junit reports.

## Installation

```bash
npm install --save-dev @reporters/junit
```
or
```bash
yarn add --dev @reporters/junit
```

## Usage

```bash
node --test \
  --test-reporter=@reporters/junit --test-reporter-destination=stdout \
  --test-reporter=spec --test-reporter-destination=stdout
```

## Example 

Output of the following test file:

```js
const { describe, it } = require('node:test');

describe('tests', () => {
  it('is ok', () => {});
  it('fails', () => {
    throw new Error('this is an error');
  });
});
```

```xml
  <testsuite name="tests" time="0.00239" disabled="0" errors="0" tests="2" failures="1" skipped="0" hostname="PC.localdomain">
    <testcase name="is ok" time="0.00057" classname="test"></testcase>
    <testcase name="fails" time="0.00017" classname="test" failure="this is an error">
      <failure message="this is an error" type="testCodeFailure">
[Error [ERR_TEST_FAILURE]: this is an error] {
  failureType: 'testCodeFailure',
  cause: Error: this is an error
      at Object.&lt;anonymous&gt; (/Users/test/reporters/tests/example.js:6:11)
      at ItTest.runInAsyncScope (node:async_hooks:204:9)
      at ItTest.run (node:internal/test_runner/test:547:25)
      at Suite.processPendingSubtests (node:internal/test_runner/test:302:27)
      at ItTest.postRun (node:internal/test_runner/test:632:19)
      at ItTest.run (node:internal/test_runner/test:575:10)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:798:7),
  code: 'ERR_TEST_FAILURE'
}
      </failure>
    </testcase>
  </testsuite>
</testsuites>
```
npm package: @reporters/mocha
Description: use any mocha reporter with `node:test`
Author: Moshe Atlow
Latest version: 1.2.0

[![npm version](https://img.shields.io/npm/v/@reporters/mocha)](https://www.npmjs.com/package/@reporters/mocha) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Mocha reporters for `node:test`
Use this custom reporter to use [mocha reporters](https://mochajs.org/#reporters) with `node:test`.
Both built-in and custom mocha reporters such as [mochawesome](https://www.npmjs.com/package/mochawesome) are supported.

## Installation

```bash
npm install --save-dev @reporters/mocha
```
or
```bash
yarn add --dev @reporters/mocha
```

## Usage

Specify the desired mocha reporter inside the [mocha configuration file](https://mochajs.org/#configuring-mocha-nodejs), e.g. `.mocharc.js`:
```js
module.exports = {
  reporter: 'nyan'
}
```

Then run the tests with `node:test`:

```bash
node --test --test-reporter=@reporters/mocha
```
npm package: @reporters/silent
Description: A silent reporter for `node:test`
Author: Moshe Atlow
Latest version: 1.3.1

[![npm version](https://img.shields.io/npm/v/@reporters/silent)](https://www.npmjs.com/package/@reporters/silent) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Silent Reporter
A Silent reporter for `node:test`, in case you don't want to see any output.

## Installation

```bash
npm install --save-dev @reporters/silent
```
or
```bash
yarn add --dev @reporters/silent
```

## Usage

```bash
node --test --test-reporter=@reporters/silent
```

the output will be empty, but the tests will still run,
and the exit code will be 0 if all tests pass, and 1 if any test fails.
npm package: @reporters/slow
Description: A slow tests reporter for `node:test`
Author: Moshe Atlow
Latest version: 1.1.1

[![npm version](https://img.shields.io/npm/v/@reporters/slow)](https://www.npmjs.com/package/@reporters/slow) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Slow tests Reporter
A Slow tests reporter for `node:test`.

## Installation

```bash
npm install --save-dev @reporters/slow
```
or
```bash
yarn add --dev @reporters/slow
```

## Usage

```bash
node --test --test-reporter=@reporters/slow
```
npm package: @reporters/testwatch
Description: An interactive repl for `node:test`
Author: Moshe Atlow
Latest version: 1.5.1

[![npm version](https://img.shields.io/npm/v/@reporters/testwatch)](https://www.npmjs.com/package/@reporters/testwatch) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# Interactive Test Runner
An interactive REPL for `node:test` watch mode.

![cli](https://raw.githubusercontent.com/MoLow/reporters/77f69c450ab0cb204fa8b81caf12516df03cdc13/packages/testwatch/assets/cli.gif)

## Installation

```bash
npm install -g @reporters/testwatch
```
or
```bash
yarn global add @reporters/testwatch
```

## Usage

Run `testwatch` in the root of your project.

```bash
testwatch
```
npm package: @reportingdev/react-console-ui
Description: The react-console-ui package offers a simple console UI component for displaying logs in React applications. Designed to improve developer experience, this package provides various types of logs like info, warning, error, and success, along with features 
Author: Braden Ericson
Latest version: 0.0.2
Deprecated: moved to react-console-ui

# React Console UI

![Your_Image_Here](https://uploads-ssl.webflow.com/63c6e835dc1c7763baa585f4/650bd176933cd3d346643790_react-console-ui.png)

## Description

`react-console-ui` is a simple console UI component for displaying logs in React applications. It handles various types of logs such as info, warning, error, and success, and offers features like expandable rows for duplicate logs.

## Installation

```bash
npm install react-console-ui
```

## How to Use

First, import ConsoleUI into your React component.

```javascript
import ConsoleUI from 'react-console-ui';
```

Then, use it in your component by passing an array of log objects to the logs prop.

```javascript
const logs = [
  { type: 'info', message: 'Info message', details: 'More details' },
  { type: 'warning', message: 'Warning message', details: 'Some warning details' },
  { type: 'error', message: 'Error occurred', details: 'Error details here' },
  { type: 'success', message: 'Success!', details: 'Action was successful' },
];

<ConsoleUI logs={logs} />
```

## Log Object
Each log object should contain:
* type: The type of log ("info", "warning", "error", "success").
* message: The main log message.
* details: Additional details for the log.