add a test to make sure "nothing" shows up as "nothing" in help (#9941)

related to 
- https://github.com/nushell/nushell/pull/9935

# Description
this PR just adds a test to make sure type annotations in `def`s show as
`nothing` in the help pages of commands.

# User-Facing Changes

# Tests + Formatting
adds a new test `nothing_type_annotation`.

# After Submitting
This commit is contained in:
Antoine Stevan 2023-08-08 19:10:34 +02:00 committed by GitHub
parent 56ed1eb807
commit b964347895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -380,3 +380,14 @@ fn help_alias_before_command() {
assert!(actual.out.contains("Alias"));
}
#[test]
fn nothing_type_annotation() {
let actual = nu!(pipeline(
"
def foo []: nothing -> nothing {};
help commands | where name == foo | get input_output.0.output.0
"
));
assert_eq!(actual.out, "nothing");
}