mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2026-02-02 11:25:10 +01:00
Compare commits
No commits in common. "e8da91ad27f4e73d22d095c8b0ca607bd50880d9" and "b732e118dfcd8b2f9b8b2302ee96ad0644f9923f" have entirely different histories.
e8da91ad27
...
b732e118df
6 changed files with 5 additions and 12 deletions
|
|
@ -9,16 +9,12 @@
|
||||||
|
|
||||||
Flexible test runner for testing Nix code, written in Go.
|
Flexible test runner for testing Nix code, written in Go.
|
||||||
|
|
||||||
[](https://asciinema.org/a/VS8uIiEQiPRtXbOreJqrxO7X6)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Snapshot, Unit (equal checks) and Script-Tests (unit tests with assertions you could say)
|
- Snapshot, Unit (equal checks) and Script-Tests (unit tests with assertions you could say)
|
||||||
- Supports testing against raw Nix code or derivation output
|
- Supports testing against raw Nix code or derivation output
|
||||||
- Simple and easy to read summary of test results
|
- Simple and easy to read summary of test results
|
||||||

|
|
||||||
- Junit report support (eg. for displaying the results in GitLab etc.)
|
- Junit report support (eg. for displaying the results in GitLab etc.)
|
||||||

|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,10 @@
|
||||||
```sh title="nix run .#nixtests:run -- --help"
|
```sh title="nix run .#nixtests:run -- --help"
|
||||||
Usage of nixtest:
|
Usage of nixtest:
|
||||||
--junit string Path to generate JUNIT report to, leave empty to disable
|
--junit string Path to generate JUNIT report to, leave empty to disable
|
||||||
--no-color Disable coloring
|
|
||||||
--pure Unset all env vars before running script tests
|
--pure Unset all env vars before running script tests
|
||||||
-s, --skip string Regular expression to skip tests (e.g., 'test-.*|.*-b')
|
--skip string Regular expression to skip (e.g., 'test-.*|.*-b')
|
||||||
--snapshot-dir string Directory where snapshots are stored (default "./snapshots")
|
--snapshot-dir string Directory where snapshots are stored (default "./snapshots")
|
||||||
-f, --tests string Path to JSON file containing tests (required)
|
--tests string Path to JSON file containing tests
|
||||||
-u, --update-snapshots Update all snapshots
|
--update-snapshots Update all snapshots
|
||||||
-w, --workers int Amount of tests to run in parallel (default 4)
|
--workers int Amount of tests to run in parallel (default 4)
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 173 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB |
|
|
@ -7,6 +7,4 @@ Flexible test runner for testing Nix code, written in Go.
|
||||||
- Snapshot, Unit (equal checks) and Script-Tests (unit tests with assertions you could say)
|
- Snapshot, Unit (equal checks) and Script-Tests (unit tests with assertions you could say)
|
||||||
- Supports testing against raw Nix code or derivation output
|
- Supports testing against raw Nix code or derivation output
|
||||||
- Simple and easy to read summary of test results
|
- Simple and easy to read summary of test results
|
||||||

|
|
||||||
- Junit report support (eg. for displaying the results in GitLab etc.)
|
- Junit report support (eg. for displaying the results in GitLab etc.)
|
||||||

|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ Examples:
|
||||||
name = "pretty-test";
|
name = "pretty-test";
|
||||||
# by default it uses json to serialize and compare the values. Derivations
|
# by default it uses json to serialize and compare the values. Derivations
|
||||||
# and functions don't really work that way though, so you can also use
|
# and functions don't really work that way though, so you can also use
|
||||||
# "pretty" to use lib.generators.toPretty
|
# "pretty" to use lib.generators.pretty
|
||||||
format = "pretty";
|
format = "pretty";
|
||||||
# you can also set the pos here
|
# you can also set the pos here
|
||||||
pos = __curPos;
|
pos = __curPos;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue