mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-03 06:12:07 -07:00
Overlay 2.0 (#12)
This commit is contained in:
@@ -8,10 +8,8 @@ test('overlay runtime bootstrap no-ops when already initialized', () => {
|
||||
isOverlayRuntimeInitialized: () => true,
|
||||
initializeOverlayRuntimeCore: () => {
|
||||
coreCalls += 1;
|
||||
return { invisibleOverlayVisible: false };
|
||||
},
|
||||
buildOptions: () => ({} as never),
|
||||
setInvisibleOverlayVisible: () => {},
|
||||
buildOptions: () => ({}) as never,
|
||||
setOverlayRuntimeInitialized: () => {},
|
||||
startBackgroundWarmups: () => {},
|
||||
});
|
||||
@@ -27,15 +25,11 @@ test('overlay runtime bootstrap runs core init and applies post-init state', ()
|
||||
isOverlayRuntimeInitialized: () => initialized,
|
||||
initializeOverlayRuntimeCore: () => {
|
||||
calls.push('core');
|
||||
return { invisibleOverlayVisible: true };
|
||||
},
|
||||
buildOptions: () => {
|
||||
calls.push('options');
|
||||
return {} as never;
|
||||
},
|
||||
setInvisibleOverlayVisible: (visible) => {
|
||||
calls.push(`invisible:${visible ? 'yes' : 'no'}`);
|
||||
},
|
||||
setOverlayRuntimeInitialized: (value) => {
|
||||
initialized = value;
|
||||
calls.push(`initialized:${value ? 'yes' : 'no'}`);
|
||||
@@ -47,5 +41,5 @@ test('overlay runtime bootstrap runs core init and applies post-init state', ()
|
||||
|
||||
initialize();
|
||||
assert.equal(initialized, true);
|
||||
assert.deepEqual(calls, ['options', 'core', 'invisible:yes', 'initialized:yes', 'warmups']);
|
||||
assert.deepEqual(calls, ['options', 'initialized:yes', 'core', 'warmups']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user