Skip to content

Robust Unit Testing#82

Merged
SkyeRangerDelta merged 11 commits into
Experimentalfrom
55-Robust-Testing
Jan 24, 2026
Merged

Robust Unit Testing#82
SkyeRangerDelta merged 11 commits into
Experimentalfrom
55-Robust-Testing

Conversation

@SkyeRangerDelta
Copy link
Copy Markdown
Owner

Closes #55 .

Designed to implement better testing coverage across the more utilitarian sections of the bot.

  • Adds Vitest unit testing suites
  • Includes updates to test pipeline

@SkyeRangerDelta SkyeRangerDelta linked an issue Jan 24, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 24, 2026

✅ Unit Test Report (Node 24.x)

58/58 tests passed

Details

> lcars47@6.1.0-E.1 test
> vitest run 2>&1 | tee logs/tests/vitest-output.log


�[1m�[46m RUN �[49m�[22m �[36mv3.2.4 �[39m�[90m/home/runner/work/LCARS47/LCARS47�[39m

�[90mstdout�[2m | Src/Subsystems/Utilities/EnvUtils.test.ts�[2m > �[22m�[2misFeatureEnabled�[2m > �[22m�[2mreturns false for non-existent feature group
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/EnvUtils.test.ts�[2m > �[22m�[2misFeatureEnabled�[2m > �[22m�[2mreturns false when beszel feature group vars are missing
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/EnvUtils.test.ts�[2m > �[22m�[2misFeatureEnabled�[2m > �[22m�[2mreturns true when beszel feature group is fully configured
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/EnvUtils.test.ts�[2m > �[22m�[2misFeatureEnabled�[2m > �[22m�[2mreturns false when jellyfin feature group is partially configured
�[22m�[39m[ENV] Starting environment validation...
==================================================
[ENV] Environment Variable Validation Report
==================================================

[ENV] WARNING - Incomplete feature groups:
  jellyfin: Jellyfin media server integration
    Missing: JELLYFIN_KEY, JELLYFIN_USER, JELLYFIN_PASS
    (Feature will be disabled)

==================================================
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/EnvUtils.test.ts�[2m > �[22m�[2misFeatureEnabled�[2m > �[22m�[2mreturns true when jellyfin is fully configured (with defaults)
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

 �[32m✓�[39m Src/Subsystems/Utilities/EnvUtils.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 66�[2mms�[22m�[39m
 �[32m✓�[39m Src/Subsystems/RemoteDS/Beszel_Utilities.test.ts �[2m(�[22m�[2m22 tests�[22m�[2m)�[22m�[32m 7�[2mms�[22m�[39m
 �[32m✓�[39m Src/Subsystems/Utilities/SysUtils.test.ts �[2m(�[22m�[2m17 tests�[22m�[2m)�[22m�[33m 391�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m stardate�[2m > �[22mformats date as MMDDYY.T �[33m 370�[2mms�[22m�[39m
�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns channel info for SIMLAB channel
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns channel info for ENGINEERING channel
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns channel info for MEDIALOG channel
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns channel info for DEVLAB channel
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns null for non-special channel
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

�[90mstdout�[2m | Src/Subsystems/Utilities/GuildUtilities.test.ts�[2m > �[22m�[2mGuildUtilities�[2m > �[22m�[2misSpecChannel�[2m > �[22m�[2mreturns null for empty string
�[22m�[39m[ENV] Starting environment validation...
[ENV] Environment validation complete. All required variables present.

 �[32m✓�[39m Src/Subsystems/Utilities/GuildUtilities.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[33m 531�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m GuildUtilities�[2m > �[22misSpecChannel�[2m > �[22mreturns channel info for SIMLAB channel �[33m 468�[2mms�[22m�[39m
 �[32m✓�[39m Src/Subsystems/Utilities/MediaUtils.test.ts �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 5�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m5 passed�[39m�[22m�[90m (5)�[39m
�[2m      Tests �[22m �[1m�[32m58 passed�[39m�[22m�[90m (58)�[39m
�[2m   Start at �[22m 04:08:46
�[2m   Duration �[22m 980ms�[2m (transform 258ms, setup 0ms, collect 305ms, tests 999ms, environment 1ms, prepare 534ms)�[22m

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jan 24, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​vitest/​coverage-v8@​3.2.4991007299100
Addedvitest@​3.2.4971007999100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jan 24, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm opusscript is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package-lock.jsonnpm/@discordjs/voice@0.19.0npm/opusscript@0.0.8

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/opusscript@0.0.8. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package-lock.jsonnpm/vitest@3.2.4npm/vite@7.3.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@7.3.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Comment thread Src/Subsystems/Utilities/SysUtils.test.ts Fixed
Comment thread Src/Subsystems/Utilities/SysUtils.test.ts Fixed
Comment thread Src/Subsystems/Utilities/SysUtils.test.ts Fixed
Comment thread Src/Subsystems/Utilities/SysUtils.test.ts Fixed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 24, 2026

✅ Type Coverage Report (Node 24.x)

Coverage: 99.95% (threshold: 90%)

Details
(4965 / 4967) 99.95%
type-coverage success.

@SkyeRangerDelta SkyeRangerDelta merged commit e252139 into Experimental Jan 24, 2026
5 checks passed
@SkyeRangerDelta SkyeRangerDelta deleted the 55-Robust-Testing branch January 24, 2026 04:11
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.

Implement proper testing system

2 participants