nushell/crates/nu-std/std
Yethal 0bdc362e13
std: refactor test-runner to no longer require tests to be exported (#9355)
# Description
Test runner now performs following actions in order to run tests:
* Module file is opened
* Public function with random name is added to the source code, this
function calls user-specified private function
* Modified module file is saved under random name in $nu.temp-path
* Modified module file is imported in subprocess, injected function is
called by the test runner
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
* Test functions no longer need to be exported
* test functions no longer need to reside in separate test_ files
* setup and teardown renamed to before-each and after-each respectively
* before-all and after-all functions added that run before all tests in
given module. This matches the behavior of test runners used by other
languages such as JUnit/TestNG or Mocha
# Tests + Formatting

# After Submitting

---------

Co-authored-by: Kamil <skelly37@protonmail.com>
Co-authored-by: amtoine <stevan.antoine@gmail.com>
2023-06-10 20:16:17 +02:00
..
assert.nu Logger constants refactored, format argument added, better formatting of failed (non) equality assertions (#9315) 2023-06-04 10:43:40 +02:00
dirs.nu Add virtual path abstraction layer (#9245) 2023-05-23 23:48:50 +03:00
dt.nu Add virtual path abstraction layer (#9245) 2023-05-23 23:48:50 +03:00
help.nu REFACTOR: build help pages instead of printing them (#9253) 2023-05-26 11:22:51 +02:00
iter.nu Add zip-into-record to std iter (#9395) 2023-06-10 20:15:30 +02:00
log.nu Logger constants refactored, format argument added, better formatting of failed (non) equality assertions (#9315) 2023-06-04 10:43:40 +02:00
mod.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
testing.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
xml.nu Add virtual path abstraction layer (#9245) 2023-05-23 23:48:50 +03:00