Skip to content

Theme tests fail on any machine with Omarchy installed #1

Closed

Description

@nixfred

Three tests in test/omarchy-theme.test.mjs (the tests at lines 18, 55 and 69) fail on a machine that has a real Omarchy, because createOmarchyTheme also reads the host.

What leaks in:

  • omarchyd/omarchy-theme.mjs lines 50 and 52 hard-code /usr/share/omarchy/themes, /usr/share/omarchy/bin, /usr/local/bin and /usr/bin. The line-69 test expects 3 themes and gets 25.
  • Two of the tests omit env, so they fall back to process.env, where Omarchy sets OMARCHY_PATH. They list the host's themes and backgrounds.

Seen on main at 4213b0d: 114 tests, 111 pass, 3 fail. A plain GitHub runner has no Omarchy, so it would pass, which is also why this has gone unnoticed.

Suggested change: give createOmarchyTheme systemShare and systemBin options that default to today's folders, and have the tests pass systemShare: null, systemBin: [], env: {}. A working version is about 10 changed lines.

Done when npm test is 114 of 114 with OMARCHY_PATH set and with it unset.

Activity

  1. added a commit that references this issue on Nov 14, 2026
  2. MyOwnDataCenter commented on Nov 14, 2026

    @MyOwnDataCenter
    Owner

    Thank you for tracking this down so precisely. The line numbers and the exact count (111 of 114) made it easy to reproduce.

    Accepted and fixed in aefa930 (0.9.12), essentially as you suggested. createOmarchyTheme now takes systemShare and systemBin options, with today's folders as the defaults, so real servers behave exactly as before. The tests pass systemShare: null, systemBin: [], env: {}.

    Verified: with a simulated /usr/share/omarchy and OMARCHY_PATH set, the old code fails the same 3 tests and the new code passes all of them. The full suite also passes with and without OMARCHY_PATH.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions