Files
dotfiles/dot_config/nushell/nu_scripts/stdlib-candidate/tests/bench.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

13 lines
308 B
Nu

use std assert
use ../std-rfc bench
export def "test bench-timings" [] {
let $test = bench {1 + 2} --rounds 3 --timings | get times | length
assert equal $test 3
}
export def "test bench-pretty" [] {
let $test = (bench {1 + 2} --rounds 3 --pretty) =~ '\d.* ± \d'
assert equal $test true
}