open-index/open-npm huggingface dataset:
npm package: @smartesting/assert-contain-exactly
Description: Simple test helper ensuring a list contains exactly the expected elements, without taking care of order.
Author: Smartesting
Latest version: 0.1.4

# @smartesting/assert-contain-exactly

[![Node.js CI](https://github.com/Smartesting/assert-contain-exactly/actions/workflows/node.js.yml/badge.svg)](https://github.com/Smartesting/assert-contain-exactly/actions/workflows/node.js.yml)

Simple test helper ensuring a list contains exactly the expected elements, without taking care of order. It is strongly inspired by [Rspec's `contain_exactly` matcher](https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/contain-exactly-matcher).

## Install

```shell
npm i --save-dev @smartesting/assert-contain-exactly
```

## Usage

```typescript
import assertContainExactly from "@smartesting/assert-contain-exactly";

const expected = ["a", "b", "c"];
const actual = getItems();
assertContainExactly(actual, expected);
```

When the arrays `actual` and `expected`, nothing happens. Otherwise, an exception is thrown and the message should help you spot the differences between the two arrays:

```
Error: Expected arrays to contain the same objects.
Missing elements were: [
  {
    id: "session-2",
    buildId: "13"
  }
]
Extra elements were: [
  {
    id: "session-B",
    buildId: "13"
  }
]
    at assertIncludesExactly (...)

```

## Notes

This code is meant to be used for testing purposes. The algorithm is not that smart not designed to handle arrays with hundred of items.
npm package: @smartesting/flaky-test-detector
Description: KISS approach for flaky test detection
Author: Smartesting
Latest version: 1.0.3

# @smartesting/flaky-test-detector

[![Node.js CI](https://github.com/Smartesting/flaky-test-detector/actions/workflows/node.js.yml/badge.svg)](https://github.com/Smartesting/flaky-test-detector/actions/workflows/node.js.yml)

KISS approach for flaky test detection:

- run the tests `n` times
- check the results
- find tests which do not have consistent results

## Installing

```
npm i @smartesting/flaky-test-detector
```

## Detect flaky tests

Add a target in your `package.json` file:

```json
{
  "scripts": {
    "detectFlaky": "flaky-test-detector.ts --run-tests \"npm run test\" --test-output-file=./test-results.xml --test-output-format=junit --repeat=5"
  }
}
```

The script takes four arguments:

- `run-tests`: the command used to execute the tests
- `test-output-file`: the file in which the test runner will output the result. Only JUnit reports are supported for now
- `test-output-format`: the test result format of the test output file. Should be `junit`or `cucumberJson`
- `repeat`: the number of time the tests will be executed