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

Expand the testing section of the hacking docs #6517

Merged
merged 2 commits into from
May 16, 2022

Conversation

thufschmitt
Copy link
Member

  • Make it clear what the different kind of tests are, where they live and how they can be ran
  • Ask people to primarily write unit tests

- Make it clear what the different kind of tests are, where they live
  and how they can be ran
- Ask people to primarily write unit tests
Nix comes with three different flavors of tests: unit, functional and integration.

Most tests are currently written as functional tests.
**However**, it is preferable (as much as it makes sense) to primarily test new code with unit tests.
Copy link
Member

Choose a reason for hiding this comment

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

I would leave out this sentence because I don't really agree that unit tests are preferable over functional tests. The latter test what we really care about, namely end-to-end behaviour of the actual tool, rather than internal interfaces.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, removed in 65a913d (Shame, that was the original motivation for this PR to answer #5377 (comment) 🙃 )

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-30/19112/1

@thufschmitt thufschmitt requested a review from edolstra May 13, 2022 14:45
@edolstra edolstra merged commit 937a106 into master May 16, 2022
@edolstra edolstra deleted the document-the-libexpr-tests branch May 16, 2022 11:19
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

Successfully merging this pull request may close these issues.

None yet

3 participants