What's the purpose of 'default' plugin tests? #3569
-
Hi everyone, I've been writing some tests for plugins I have imported, but I'm unsure what the purpose of the 'default' plugin test is, when surely 'empty' will just bring in the defaults anyway? I think I get the idea of 'example': it's to test if the example settings in the documentation actually works. However, I'm unsure what bugs the 'default' test would catch that 'empty' wouldn't. Peeking at other PRs seem to suggest that the 'default' test is optional. Would anyone be able to clarify the purpose of 'default' tests? Apologies if the answer is well documented somewhere. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Many nixvim plugins declare settings options that describe the "plugin default". Especially older plugin modules. A "plugin default" is different to an actual option default (which is usually The This is less relevant for plugins that don't declare settings options with "plugin defaults" documented for the sub-options. Generally speaking, more recent plugins don't add explicit sub-options, so they don't need a |
Beta Was this translation helpful? Give feedback.
Many nixvim plugins declare settings options that describe the "plugin default". Especially older plugin modules.
A "plugin default" is different to an actual option default (which is usually
null
).The
defaults
test case exists to test explicitly defining the values that are documented as "plugin defaults".This is less relevant for plugins that don't declare settings options with "plugin defaults" documented for the sub-options. Generally speaking, more recent plugins don't add explicit sub-options, so they don't need a
defaults
test case.