1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

tests/discoss: add tests

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-10-05 14:31:53 -05:00
parent 6e8ab005bc
commit 3c3076b1c1
5 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{
config = {
programs.discocss = {
enable = true;
package = null;
discordAlias = false;
css = ''
/* Custom Discord theme */
.theme-dark {
--background-primary: #2f3136;
--background-secondary: #36393f;
}
.chat-3bRxxu {
background: var(--background-primary);
}
.content-yTz4x3:before {
content: "Custom CSS Loaded";
color: #43b581;
}
'';
};
nmt.script = ''
assertFileExists home-files/.config/discocss/custom.css
assertFileContent \
home-files/.config/discocss/custom.css \
${./with-custom-css-expected.css}
'';
};
}

View file

@ -0,0 +1,5 @@
{
discocss-basic-configuration = ./basic-configuration.nix;
discocss-no-packages = ./no-packages.nix;
discocss-no-css = ./no-css.nix;
}

View file

@ -0,0 +1,12 @@
{
config = {
programs.discocss = {
enable = true;
discordAlias = false;
};
nmt.script = ''
assertPathNotExists home-files/.config/discocss/custom.css
'';
};
}

View file

@ -0,0 +1,34 @@
{
config = {
programs.discocss = {
enable = true;
package = null;
discordPackage = null;
discordAlias = false;
css = ''
/* Custom Discord theme */
.theme-dark {
--background-primary: #2f3136;
--background-secondary: #36393f;
}
.chat-3bRxxu {
background: var(--background-primary);
}
.content-yTz4x3:before {
content: "Custom CSS Loaded";
color: #43b581;
}
'';
};
nmt.script = ''
assertFileExists home-files/.config/discocss/custom.css
assertFileContent \
home-files/.config/discocss/custom.css \
${./with-custom-css-expected.css}
'';
};
}

View file

@ -0,0 +1,14 @@
/* Custom Discord theme */
.theme-dark {
--background-primary: #2f3136;
--background-secondary: #36393f;
}
.chat-3bRxxu {
background: var(--background-primary);
}
.content-yTz4x3:before {
content: "Custom CSS Loaded";
color: #43b581;
}