mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:25:38 +02:00
Update std-rfc
tests for to use @test
attributes (#15098)
After #14906, the test runner was updated to use attributes, along with the existing `std` modules. However, since that PR was started before `std-rfc` was in main, it didn't include updates to those tests. Once #14906 was merged, the `std-rfc` tests no longer ran in CI. This PR updates the tests accordingly.
This commit is contained in:
@ -8,12 +8,18 @@ def "nu-complete threads" [] {
|
||||
seq 1 (sys cpu | length)
|
||||
}
|
||||
|
||||
# Here we store the map of annotations internal names and the annotation actually used during test creation
|
||||
# The reason we do that is to allow annotations to be easily renamed without modifying rest of the code
|
||||
# Functions with no annotations or with annotations not on the list are rejected during module evaluation
|
||||
# test and test-skip annotations may be used multiple times throughout the module as the function names are stored in a list
|
||||
# Other annotations should only be used once within a module file
|
||||
# If you find yourself in need of multiple before- or after- functions it's a sign your test suite probably needs redesign
|
||||
# Here we store the map of annotations' internal names along with the annotation actually
|
||||
# used during test creation. We do this to allow annotations to be easily renamed without
|
||||
# modifying rest of the code.
|
||||
# Functions with no annotations or with annotations not on the list are rejected during module evaluation.
|
||||
#
|
||||
# `test` and `test-skip` annotations may be used multiple times throughout the module as the function names
|
||||
# are stored in a list.
|
||||
#
|
||||
# Other annotations should only be used once within a module file.
|
||||
#
|
||||
# If you find yourself in need of multiple `before-*` or `after-*` functions, it's a sign your test suite
|
||||
# probably needs redesign.
|
||||
const valid_annotations = {
|
||||
"test": "test",
|
||||
"ignore": "test-skip",
|
||||
@ -23,7 +29,7 @@ const valid_annotations = {
|
||||
"after-all": "after-all"
|
||||
}
|
||||
|
||||
# Returns a table containing the list of function names together with their annotations (comments above the declaration)
|
||||
# Returns a table containing the list of command names along with their attributes.
|
||||
def get-annotated [
|
||||
file: path
|
||||
]: nothing -> table<function_name: string, annotation: string> {
|
||||
|
Reference in New Issue
Block a user