Code Monkey home page Code Monkey logo

nix-unit's Introduction

nix-unit

This project runs an attribute set of tests compatible with lib.debug.runTests while allowing individual attributes to fail.

Why use nix-unit?

  • Simple structure compatible with lib.debug.runTests

  • Allows individual test attributes to fail individually.

Rather than evaluating the entire test suite in one go, serialise & compare nix-unit uses the Nix evaluator C++ API. Meaning that we can catch test failures individually, even if the failure is caused by an evaluation error.

  • Fast.

No additional processing and coordination overhead caused by the external process approach.

Comparison with other tools

This comparison matrix was originally taken from Unit test your Nix code but has been adapted. Pythonix is excluded as it's unmaintained.

Tool Can test eval failures Tests defined in Nix in nixpkgs snapshot testing(1)
Nix-unit yes yes yes no
runTests no yes yes no
Nixt no yes no no
Namaka no yes yes yes
  1. Snapshot testing

Documentation

https://nix-community.github.io/nix-unit/

nix-unit's People

Contributors

adisbladis avatar mic92 avatar github-actions[bot] avatar mergify[bot] avatar dependabot[bot] avatar renovate[bot] avatar jsoo1 avatar bors[bot] avatar phaer avatar andreabedini avatar zhaofengli avatar tomberek avatar davhau avatar julienmalka avatar raitobezarius avatar nrdxp avatar hsjobeki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.