Skip to content

Move unit test runner to standard library#8850

Merged
sholderbach merged 8 commits intonushell:mainfrom
presidento:std-test-runner
Apr 13, 2023
Merged

Move unit test runner to standard library#8850
sholderbach merged 8 commits intonushell:mainfrom
presidento:std-test-runner

Conversation

@presidento
Copy link
Copy Markdown
Contributor

Move test runner to standard library.
Originated from #8819

After Submitting

I'll update the documentation about testing: http://www.nushell.sh/book/testing.html

@presidento presidento marked this pull request as draft April 10, 2023 21:04
presidento and others added 2 commits April 10, 2023 23:13
I was not able to include it from a submodule,
so I put the code into mod.nu.
@presidento presidento marked this pull request as ready for review April 11, 2023 08:48
@presidento
Copy link
Copy Markdown
Contributor Author

@amtoine I put the run-tests command into mod.nu. If you want a separate file for it, please tell me how to do it.

Copy link
Copy Markdown
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have a look at how to put this in a module 👍

@amtoine
Copy link
Copy Markdown
Member

amtoine commented Apr 11, 2023

@amtoine I put the run-tests command into mod.nu. If you want a separate file for it, please tell me how to do it.

something you can do

  • let's say you move the commands from crates/nu-std/lib/mod.nu to something like crates/nu-std/lib/testing.nu
  • then you can apply patch.diff

a bit hacky for now but that should work i think as std testing run 👍

Warning
you can NOT do use std testing and then testing run for now 😌

@presidento
Copy link
Copy Markdown
Contributor Author

Applied, thanks. (I cannot test it in my current computer.)

@sholderbach sholderbach added A:std-library Defining and improving the standard library written in Nu tests issues to add tests or fix tests labels Apr 11, 2023
@presidento
Copy link
Copy Markdown
Contributor Author

presidento commented Apr 12, 2023

I moved the test-related stuff to testing.nu: the assert commands and the test runner. If you want to do it in a separated PR, I can just move the test runner into assert.nu, then rename it to testing in a different PR.

@presidento
Copy link
Copy Markdown
Contributor Author

It failed with an unrelated error.

Copy link
Copy Markdown
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, you know what, that looks good 🤩

if we find things to tweak, we can address them later 😌

thanks for all this and let's merge it 💪

@sholderbach sholderbach merged commit b2d7427 into nushell:main Apr 13, 2023
@presidento presidento deleted the std-test-runner branch April 13, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:std-library Defining and improving the standard library written in Nu tests issues to add tests or fix tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants