Fix app settings tests missing the image cleanup dependency

The app-settings fixture omits `apps.imageCleanup`, so all 11 settings
tests fail with `Cannot read properties of undefined (reading
'runOperation')` before exercising the settings behavior.

Initialize a real `ImageCleanup` with a no-op sweep in the fixture,
matching the app-lifecycle tests and restoring the existing settings
assertions.
This commit is contained in:
Luke Childs
2026-09-18 02:24:10 +07:00
committed by GitHub
parent 257adaa8f0
commit eff0da31ae
@@ -8,6 +8,7 @@ import {afterEach, describe, expect, test, vi} from 'vitest'
import type Umbreld from '../../index.js'
import App, {normalizeAppMountTargetPath, normalizeAppStorageSourcePath} from './app.js'
import ImageCleanup from './image-cleanup.js'
import type {AppManifest} from './schema.js'
const temporaryDirectories: string[] = []
@@ -27,6 +28,7 @@ async function createApp() {
eventBus: {emit: vi.fn(async () => undefined)},
apps: {
instances,
imageCleanup: new ImageCleanup(async () => {}, {log: vi.fn(), error: vi.fn()}),
getDataRootPathsForApps: vi.fn(async () => []),
getDataRootPathRelation: vi.fn(() => null),
setFolderAccessSourcePaths: vi.fn(),