File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/app-runtime/test/lib/natives Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
- import { EventEmitter2EventBus , Result } from "@js-soft/ts-utils" ;
1
+ import { EventBus , EventEmitter2EventBus , Result } from "@js-soft/ts-utils" ;
2
2
import { WebLoggerFactory } from "@js-soft/web-logger" ;
3
3
import { INativeBootstrapper , INativeEnvironment } from "../../../src" ;
4
4
import { FakeNativeConfigAccess } from "./FakeNativeConfigAccess" ;
@@ -7,6 +7,8 @@ import { FakeNativeDeviceInfoAccess } from "./FakeNativeDeviceInfoAccess";
7
7
import { FakeNativeNotificationAccess } from "./FakeNativeNotificationAccess" ;
8
8
9
9
export class FakeNativeBootstrapper implements INativeBootstrapper {
10
+ public constructor ( private readonly eventBus ?: EventBus ) { }
11
+
10
12
private _nativeEnvironment : INativeEnvironment ;
11
13
public get nativeEnvironment ( ) : INativeEnvironment {
12
14
return this . _nativeEnvironment ;
@@ -24,9 +26,11 @@ export class FakeNativeBootstrapper implements INativeBootstrapper {
24
26
configAccess : new FakeNativeConfigAccess ( ) ,
25
27
databaseFactory : new FakeNativeDatabaseFactory ( ) ,
26
28
deviceInfoAccess : new FakeNativeDeviceInfoAccess ( ) ,
27
- eventBus : new EventEmitter2EventBus ( ( ) => {
28
- // noop
29
- } ) ,
29
+ eventBus :
30
+ this . eventBus ??
31
+ new EventEmitter2EventBus ( ( ) => {
32
+ // noop
33
+ } ) ,
30
34
loggerFactory,
31
35
notificationAccess : new FakeNativeNotificationAccess ( nativeLogger )
32
36
} ;
You can’t perform that action at this time.
0 commit comments