Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace std testing with nupm #1257

Open
texastoland opened this issue Feb 18, 2024 · 5 comments
Open

Replace std testing with nupm #1257

texastoland opened this issue Feb 18, 2024 · 5 comments

Comments

@texastoland
Copy link
Contributor

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

@fdncred
Copy link
Collaborator

fdncred commented Feb 18, 2024

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

@texastoland
Copy link
Contributor Author

Probably not helpful to document both ways though.

@texastoland
Copy link
Contributor Author

texastoland commented Mar 16, 2024

@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
Copy link
Collaborator

fdncred commented Mar 16, 2024

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
Copy link
Contributor Author

texastoland commented Mar 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants