Skip to content

Commit 11d99cc

Browse files
committed
chore: rename nu-test instances to nutest to be consistent with the command names
1 parent 2df3030 commit 11d99cc

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

.github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
version: ${{ matrix.version }}
3838

39-
- name: Test Nu-Test
39+
- name: Test Nutest
4040
shell: nu {0}
4141
run: |
4242
nu -c 'use nutest; (

PLAN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
## Milestone: Version 1.0
1313

14-
- Use step outputs for file references
1514
- Versioning strategy, labels and docs/automation
1615
- Basic contributor agreement if needed
1716

@@ -29,6 +28,7 @@
2928
## Future Ideas
3029

3130
- Support matchers in `list-tests` (a trivial win)
31+
- Allow before-all and before-each to be specified without returning context
3232
- Optimisation: If nothing requires test output (e.g. summary), we can avoid having to process it
3333
- Optionally write decoded event stream to file to help debug Nutest itself.
3434
- Optionally allow running ignored tests.

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Nu-test
1+
# Nutest
22

3-
![CI/CD](https://github.com/vyadh/nu-test/actions/workflows/tests.yaml/badge.svg)
3+
![CI/CD](https://github.com/vyadh/nutest/actions/workflows/tests.yaml/badge.svg)
44
![Tests](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fvyadh%2F0cbdca67f966d7ea2e6e1eaf7c9083a3%2Fraw%2Ftest-summary.json&query=%24.total&label=Tests)
55
![Passed](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fvyadh%2F0cbdca67f966d7ea2e6e1eaf7c9083a3%2Fraw%2Ftest-summary.json&query=%24.passed&label=Passed&color=%2331c654)
66
![Failed](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fvyadh%2F0cbdca67f966d7ea2e6e1eaf7c9083a3%2Fraw%2Ftest-summary.json&query=%24.failed&label=Failed&color=red)
77
![Skipped](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fvyadh%2F0cbdca67f966d7ea2e6e1eaf7c9083a3%2Fraw%2Ftest-summary.json&query=%24.skipped&label=Skipped&color=yellow)
88

9-
A [Nushell](https://www.nushell.sh) test runner.
9+
A [Nushell](https://www.nushell.sh) test framework.
1010

11-
![An example nu-test run](resources/test-run.png)
11+
![An example nutest run](resources/test-run.png)
1212

1313
*^ Tests are structured data that can be processed just like any other table.*
1414

15-
![An example nu-test run](resources/test-run-terminal.png)
15+
![An example nutest run](resources/test-run-terminal.png)
1616

1717
*^ Terminal mode - test results appear as they complete.*
1818

@@ -36,8 +36,8 @@ Note: Nu-test is fully functional but currently still in pre-1.0 development.
3636
First-time installation:
3737

3838
```nushell
39-
git https://github.com/vyadh/nu-test.git
40-
nupm install nu-test --path
39+
git https://github.com/vyadh/nutest.git
40+
nupm install nutest --path
4141
```
4242

4343
Usage:
@@ -53,8 +53,8 @@ nutest run-tests
5353
First-time installation:
5454

5555
```nushell
56-
git https://github.com/vyadh/nu-test.git
57-
cp -r nu-test/nutest <a directory referenced by NU_LIB_DIRS / $env.NU_LIB_DIRS>
56+
git https://github.com/vyadh/nutest.git
57+
cp -r nutest/nutest <a directory referenced by NU_LIB_DIRS / $env.NU_LIB_DIRS>
5858
```
5959

6060
Usage:
@@ -70,7 +70,7 @@ nutest run-tests
7070

7171
### Test Suites
7272

73-
A recognised test suite (a Nushell file containing tests) is recognised by nu-test is defined as a filename matching one of the following patterns somewhere within the path:
73+
A recognised test suite (a Nushell file containing tests) is recognised by nutest is defined as a filename matching one of the following patterns somewhere within the path:
7474
- `test_*.nu`
7575
- `test-*.nu`
7676
- `*_test.nu`
@@ -202,7 +202,7 @@ Typing the following and pressing tab will show all available tests that contain
202202
run-tests --match-tests parse<tab>
203203
```
204204

205-
While test discovery is done concurrently and quick even with many test files, you can specify `--match-suites <pattern>` before `--match-tests` to greatly reduce the amount of work nu-test needs to do to find the tests you want to run.
205+
While test discovery is done concurrently and quick even with many test files, you can specify `--match-suites <pattern>` before `--match-tests` to greatly reduce the amount of work nutest needs to do to find the tests you want to run.
206206

207207
### Results Output
208208

nutest/report/report_junit.nu

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def testsuites []: table<suite: string, test: string, result: string, output: li
5151
{
5252
tag: "testsuites"
5353
attributes: {
54-
name: "nu-test"
54+
name: "nutest"
5555
tests: $"($stats.total)"
5656
disabled: $"($stats.skipped)"
5757
failures: $"($stats.failed)"

tests/report/test_report_junit.nu

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def "testsuites with suites" [] {
158158
let result = $data | testsuites | to xml --self-closed
159159

160160
assert equal $result ('
161-
<testsuites name="nu-test" tests="3" disabled="1" failures="1">
161+
<testsuites name="nutest" tests="3" disabled="1" failures="1">
162162
<testsuite name="suite1" tests="1" disabled="0" failures="0">
163163
<testcase name="testA" classname="suite1"/>
164164
</testsuite>

tests/test_integration.nu

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def with-junit-report [] {
260260

261261
test-run-raw $"run-tests --path '($temp)' --report { type: junit, path: '($report_path)' }"
262262

263-
assert equal ($report_path | open --raw | strip-xml-whitespace) ('<testsuites name="nu-test" tests="6" disabled="2" failures="1">
263+
assert equal ($report_path | open --raw | strip-xml-whitespace) ('<testsuites name="nutest" tests="6" disabled="2" failures="1">
264264
<testsuite name="test_1" tests="2" disabled="0" failures="0">
265265
<testcase name="test_bar" classname="test_1"/>
266266
<testcase name="test_foo" classname="test_1"/>

0 commit comments

Comments
 (0)