about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Documentation/INSTALLING.md5
-rw-r--r--flake.lockbin6348 -> 6792 bytes
-rw-r--r--flake.nix5
-rw-r--r--tests/testing_test.nix14
4 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/INSTALLING.md b/Documentation/INSTALLING.md
index 880845a..31ebefa 100644
--- a/Documentation/INSTALLING.md
+++ b/Documentation/INSTALLING.md
@@ -57,3 +57,8 @@ $ nix build .#isoConfigurations.$HOST-$HARDWARE-$ARCH.config.system.build.isoIma
 ```
 # deploy -s .#$HOST-$HARDWARE-$ARCH --hostname $TARGET_IP
 ```
+
+## Testing
+```
+$ nix eval .#tests
+```
diff --git a/flake.lock b/flake.lock
index 3867d3e..2f7bf9e 100644
--- a/flake.lock
+++ b/flake.lock
Binary files differdiff --git a/flake.nix b/flake.nix
index 6e1cb82..f77b46e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,6 +20,8 @@
 
     nur.url = "github:nix-community/NUR";
 
+    nixtest.url = "github:jetpack-io/nixtest";
+
     nix-index.url = "github:Mic92/nix-index-database";
 
     hosts = {
@@ -117,5 +119,8 @@
 
       # This is highly advised, and will prevent many possible mistakes
       checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
+
+
+      tests = inputs.nixtest.run ./.;
     };
 }
diff --git a/tests/testing_test.nix b/tests/testing_test.nix
new file mode 100644
index 0000000..b977fc0
--- /dev/null
+++ b/tests/testing_test.nix
@@ -0,0 +1,14 @@
+let
+  lib = import ./lib.nix;
+in [
+  {
+    name = "Test function concatenate";
+    actual = lib.concatenate "a" "b";
+    expected = "ab";
+  }
+  {
+    name = "Test function add";
+    actual = lib.add 1 2;
+    expected = 3;
+  }
+]