tests: use callTest pattern

Allows using the `callPackage(s)` pattern on tests.

Rather than using `pkgs.callPackage`, we implement our own variant using
`lib.callPackageWith`.

Our variant (`callTest`) includes additional nixvim-specific stuff
commonly used by our tests.
This commit is contained in:
Matt Sturgeon 2024-10-17 19:59:37 +01:00
parent 990ef039f7
commit 4a508ceee2
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 42 additions and 43 deletions

View file

@ -1,13 +1,15 @@
# Collects the various test modules in tests/test-sources/ and groups them into a number of test derivations
{
lib ? pkgs.lib,
callPackage,
callTest,
helpers,
lib ? pkgs.lib,
pkgs,
pkgsUnfree,
}:
let
fetchTests = import ./fetch-tests.nix { inherit lib pkgs helpers; };
test-derivation = import ../lib/tests.nix { inherit pkgs lib; };
fetchTests = callTest ./fetch-tests.nix { };
test-derivation = callPackage ../lib/tests.nix { };
inherit (test-derivation) mkTestDerivationFromNixvimModule;
moduleToTest =