Skip to content

feat(tests): add test utils (tlib) v2#446

Closed
zenoli wants to merge 34 commits into
BirdeeHub:mainfrom
zenoli:test-lib-module-passing-rework
Closed

feat(tests): add test utils (tlib) v2#446
zenoli wants to merge 34 commits into
BirdeeHub:mainfrom
zenoli:test-lib-module-passing-rework

Conversation

@zenoli
Copy link
Copy Markdown
Contributor

@zenoli zenoli commented Apr 18, 2026

This is an extension of #439 which I refer to as "V1".

V1 Syntax

(runTest "if nix-direnv is enabled then lib/nix-direnv.sh should exists" (
  let
    wrapper = self.wrappers.direnv.wrap {
      inherit pkgs;
      nix-direnv.enable = true; 
    };
  in
  [
    (isDirectory (getDotdir wrapper))
    (isFile "${getDotdir wrapper}/lib/nix-direnv.sh")
  ]
))

V2 Syntax

The V2 syntax is 100% backwards compatible to V1. But it can also do this:

(runTest
  {
    name = "if nix-direnv is enabled then lib/nix-direnv.sh should exists";
    config.nix-direnv.enable = true;
  }
  (wrapper: [  # <-- this wrapper has the above config applied
    (isDirectory (getDotdir wrapper))
    (isFile "${getDotdir wrapper}/lib/nix-direnv.sh")
  ])
)

@zenoli zenoli mentioned this pull request Apr 18, 2026
3 tasks
@zenoli zenoli changed the title Test lib module passing rework feat(tests): add test utils (tlib) v2 Apr 18, 2026
@zenoli zenoli force-pushed the test-lib-module-passing-rework branch 2 times, most recently from 63f5e89 to 0a2b676 Compare April 18, 2026 17:11
@BirdeeHub
Copy link
Copy Markdown
Owner

BirdeeHub commented Apr 21, 2026

Sorry for any merge conflicts you get, I'm adding the ..., hopefully it lets you rebase and doesn't yell at you because they are the same?

@zenoli
Copy link
Copy Markdown
Contributor Author

zenoli commented Apr 21, 2026

No worries. Thx for
Letting me know

@zenoli
Copy link
Copy Markdown
Contributor Author

zenoli commented Apr 25, 2026

Closing this as the final version is now here #439

@zenoli zenoli closed this Apr 25, 2026
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.

2 participants