Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d-gubert committed Jan 18, 2024
1 parent 3e7f1af commit 66f7f6f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/test-data/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import type {
import type { UIActionButtonManager } from '../../src/server/managers/UIActionButtonManager';
import type { DenoRuntimeSubprocessController } from '../../src/server/runtime/AppsEngineDenoRuntime';
import { AppPackageParser } from '../../src/server/compiler';
import type { AppRuntimeManager } from '../../src/server/managers/AppRuntimeManager';

export class TestInfastructureSetup {
private appStorage: TestsAppStorage;
Expand All @@ -47,11 +48,22 @@ export class TestInfastructureSetup {

private appManager: AppManager;

private runtimeManager: AppRuntimeManager;

constructor() {
this.appStorage = new TestsAppStorage();
this.logStorage = new TestsAppLogStorage();
this.bridges = new TestsAppBridges();
this.sourceStorage = new TestSourceStorage();
this.runtimeManager = {
startRuntimeForApp: async () => {
return {} as DenoRuntimeSubprocessController;
},
runInSandbox: async () => {
return {} as unknown as Promise<unknown>;
},
stopRuntime: () => {},
} as unknown as AppRuntimeManager;

this.appManager = {
getParser() {
Expand Down Expand Up @@ -88,7 +100,10 @@ export class TestInfastructureSetup {
getSettingsManager() {
return {} as AppSettingsManager;
},
} as AppManager;
getRuntime: () => {
return this.runtimeManager;
},
} as unknown as AppManager;
}

public getAppStorage(): AppMetadataStorage {
Expand Down

0 comments on commit 66f7f6f

Please sign in to comment.