mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-04 06:41:49 +00:00
- Delete items which are no longer used that might cause potential problems
- Fix Some Imports - Fix floating promises on tests
This commit is contained in:
@@ -20,7 +20,7 @@ describe("setupObsidian/setupManagerHandlers", () => {
|
||||
|
||||
it("openSetupURI should delegate to SetupManager.onUseSetupURI", async () => {
|
||||
const setupManager = {
|
||||
onUseSetupURI: vi.fn(async () => true),
|
||||
onUseSetupURI: vi.fn(async () => await Promise.resolve(true)),
|
||||
} as any;
|
||||
|
||||
await openSetupURI(setupManager);
|
||||
@@ -37,7 +37,7 @@ describe("setupObsidian/setupManagerHandlers", () => {
|
||||
},
|
||||
} as any;
|
||||
const setupManager = {
|
||||
onP2PManualSetup: vi.fn(async () => true),
|
||||
onP2PManualSetup: vi.fn(async () => await Promise.resolve(true)),
|
||||
} as any;
|
||||
|
||||
await openP2PSettings(host, setupManager);
|
||||
@@ -65,8 +65,8 @@ describe("setupObsidian/setupManagerHandlers", () => {
|
||||
},
|
||||
} as any;
|
||||
const setupManager = {
|
||||
onUseSetupURI: vi.fn(async () => true),
|
||||
onP2PManualSetup: vi.fn(async () => true),
|
||||
onUseSetupURI: vi.fn(async () => await Promise.resolve(true)),
|
||||
onP2PManualSetup: vi.fn(async () => await Promise.resolve(true)),
|
||||
} as any;
|
||||
|
||||
useSetupManagerHandlersFeature(host, setupManager);
|
||||
|
||||
@@ -37,8 +37,8 @@ describe("setupObsidian/setupProtocol", () => {
|
||||
} as any;
|
||||
const log = vi.fn();
|
||||
const setupManager = {
|
||||
onUseSetupURI: vi.fn(async () => true),
|
||||
decodeQR: vi.fn(async () => true),
|
||||
onUseSetupURI: vi.fn(async () => await Promise.resolve(true)),
|
||||
decodeQR: vi.fn(async () => await Promise.resolve(true)),
|
||||
} as any;
|
||||
|
||||
registerSetupProtocolHandler(host, log, setupManager);
|
||||
@@ -67,8 +67,8 @@ describe("setupObsidian/setupProtocol", () => {
|
||||
} as any;
|
||||
const log = vi.fn();
|
||||
const setupManager = {
|
||||
onUseSetupURI: vi.fn(async () => true),
|
||||
decodeQR: vi.fn(async () => true),
|
||||
onUseSetupURI: vi.fn(async () => await Promise.resolve(true)),
|
||||
decodeQR: vi.fn(async () => await Promise.resolve(true)),
|
||||
} as any;
|
||||
|
||||
registerSetupProtocolHandler(host, log, setupManager);
|
||||
|
||||
Reference in New Issue
Block a user