nushell / nushell.github.io

Nushell's main website, blog, book, and more
https://www.nushell.sh/book/
MIT License
183 stars 431 forks source link

Replace std testing with nupm #1257

Open texastoland opened 8 months ago

texastoland commented 8 months ago

std testing module went from deprecated to removed since nushell/nushell#11331 in 0.90.0. Now requires nupm.

fdncred commented 8 months ago

It's also in nu_scripts if you still want to use it.

texastoland commented 8 months ago

Probably not helpful to document both ways though.

texastoland commented 7 months ago

@fdncred I'm down now if you're open to it. I wouldn't discuss nupm itself. Basically:

  1. Clone nupm
  2. Add it to $env.NU_LIB_DIRS
  3. Create empty nupm.nuon (I think this should be relaxed)
  4. Create sibling tests directory
  5. Create mod.nu
  6. Add export def using std assert
  7. nupm test to run all visible commands
  8. --dir flag to target a different path
fdncred commented 7 months ago

seems like a pain to me.

Seems easier just to use crates/nu-std/testing.nu

But I don't really care, if others like this strategy.

texastoland commented 7 months ago

seems like a pain to me.

NGL I wish nupm was included under an experimental module or something.

Seems easier just to use crates/nu-std/testing.nu

I don't use Rust to manage non-Rust stuff though. FWIW half of those are nearly identical to (in a way less complicated than) std testing.

But I don't really care, if others like this strategy.

CC @kubouch or whoever has an opinion. Just combing through issues I was interested in.