stdlib: add test discovery, extract test files#8443
Conversation
amtoine
left a comment
There was a problem hiding this comment.
that is truely amazing, love the idea and how it shows up when running nu tests.nu ❤️
i've got some proposition in comments, but mainly things i've gathered with time so, without a proper nufmt, i'm fine with yours and mine 😉
(just the newlines please to avoid having a monolothic for loop 😉 the rest is much more minor 👀)
thanks again 😊
|
Thank you for the review. I don't have strong preferences on them, so I tried to implement everything, please check it. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8443 +/- ##
==========================================
- Coverage 68.13% 68.06% -0.08%
==========================================
Files 620 621 +1
Lines 99723 99938 +215
==========================================
+ Hits 67950 68023 +73
- Misses 31773 31915 +142 |
noishe, i always find more spaced code way easier to read 😌 that will have to be confirmed with |
amtoine
left a comment
There was a problem hiding this comment.
a thought i had about the grey color, not sure how it looks like not with the default theme 👍
|
Are we ready to land this one? |
|
Thanks |
> **Warning** > this PR is the result of a demand from the core team, to have the simplest structure for the standard library, at least for now 👍 # Description this PR mainly - moved the `dirs.nu` module to the end of `std.nu` - fixed the imports in `test_dirs.nu` # User-Facing Changes ``` $nothing ``` # Tests + Formatting with the new runner from #8443, we get as expected 👌 ``` >_ nu crates/nu-utils/standard_library/tests.nu INFO Run tests in test_dirs DEBUG Run test test_dirs/test_dirs_command INFO Run tests in test_std DEBUG Run test test_std/test_assert DEBUG Run test test_std/test_match DEBUG Run test test_std/test_path_add ``` # After Submitting ``` $nothing ```
# Description ```nushell log critical "this is a critical message" log error "this is an error message" log warning "this is a warning message" log info "this is an info message" log debug "this is a debug message" ```  # Tests + Formatting Tests are written. To run automatically, #8443 needs to be merged before or after this PR. --------- Co-authored-by: Mate Farkas <Mate.Farkas@oneidentity.com>

Description
Was original asked here: #8405 (comment)
Make it easier to extend standard library with submodules.
(For a new submodule called
xx.nuthe tests can be written intest_xx.nu).Test discovery is implemented.
User-Facing Changes
There are no user-facing changes.
Tests + Formatting
Tests are updated.
There is no
nufmtnow.