Fix ProfileWatcherTest: handle FileSystem not loaded in test env

This commit is contained in:
Graham McIntire 2026-06-16 16:33:26 -05:00
parent bdf22cd411
commit 00b0ed2f5d

View file

@ -81,7 +81,12 @@ defmodule Towerops.Profiles.ProfileWatcherTest do
describe "GenServer init/handle_info" do
test "init/1 returns :ok with a state map" do
assert {:ok, state} = ProfileWatcher.init([])
assert map_size(state) > 0
if Code.ensure_loaded?(FileSystem) do
assert map_size(state) > 0
else
assert state == %{}
end
end
test "handles :stop file_event without crashing" do