-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
[poc] tests/plugins: test package options #2121
base: main
Are you sure you want to change the base?
Conversation
59e1a02
to
97b5737
Compare
7756618
to
23a9196
Compare
{ | ||
plugins.bufferline.enable = true; | ||
|
||
assertions = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make more sense to test the package existence in our existing empty test cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's nice to keep the "empty" case simple.
Maybe we should consider adding test.runNvim = false
to these assertion-based tests though, since we don't actually need to run neovim if all we care about is the assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, don't need to waste processing time that way if it's just evaluation time testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes me think we could do with a test.build
toggle to completely disable building finalPackage
, although we'd probably still want to ensure it is evaluated somehow (just not built)
assertion = | ||
config.extraPlugins != [ ] | ||
&& lib.any ( | ||
x: lib.trace "${x.pname or ""}" x.pname or null == "bufferline.nvim" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking on noogle, there's also lib.getName
, although I think that could fail when encountering submodule-type plugin definitions...
Just a little POC from a discussion about testing options functionality working, as expected for when we add or don't add packages.