Skip to content

Commit c0824d2

Browse files
authored
test(extensions): remove type-only probe contracts (#124190)
1 parent 571009d commit c0824d2

6 files changed

Lines changed: 3 additions & 58 deletions

File tree

‎extensions/discord/src/directory-contract.test.ts‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
// Discord tests cover directory contract plugin behavior.
2-
import type { BaseProbeResult, BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract";
32
import { expectDirectoryIds } from "openclaw/plugin-sdk/channel-test-helpers";
43
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
5-
import { describe, expect, expectTypeOf, it } from "vitest";
4+
import { describe, expect, it } from "vitest";
65
import {
76
listDiscordDirectoryGroupsFromConfig,
87
listDiscordDirectoryPeersFromConfig,
98
} from "../directory-contract-api.js";
10-
import type { DiscordProbe } from "./probe.js";
11-
import type { DiscordTokenResolution } from "./token.js";
12-
139
describe("Discord directory contract", () => {
14-
it("keeps public probe and token resolution aligned with base contracts", () => {
15-
expectTypeOf<DiscordProbe>().toMatchTypeOf<BaseProbeResult>();
16-
expectTypeOf<DiscordTokenResolution>().toMatchTypeOf<BaseTokenResolution>();
17-
});
18-
1910
it("lists peers/groups from config (numeric ids only)", async () => {
2011
const cfg = {
2112
channels: {

‎extensions/imessage/src/probe.contract.test.ts‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎extensions/line/src/probe.contract.test.ts‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎extensions/signal/src/probe.contract.test.ts‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎extensions/slack/src/directory-contract.test.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// Slack tests cover directory contract plugin behavior.
2-
import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract";
32
import { expectDirectoryIds } from "openclaw/plugin-sdk/channel-test-helpers";
43
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
5-
import { beforeEach, describe, expect, expectTypeOf, it, vi } from "vitest";
4+
import { beforeEach, describe, expect, it, vi } from "vitest";
65
import {
76
listSlackDirectoryGroupsFromConfig,
87
listSlackDirectoryPeersFromConfig,
98
} from "../directory-contract-api.js";
109
import { getSlackDirectorySelfLive } from "./directory-live.js";
11-
import type { SlackProbe } from "./probe.js";
12-
1310
const slackClientMocks = vi.hoisted(() => ({
1411
authTest: vi.fn(),
1512
usersInfo: vi.fn(),
@@ -30,10 +27,6 @@ describe("Slack directory contract", () => {
3027
slackClientMocks.createSlackLookupClient.mockClear();
3128
});
3229

33-
it("keeps public probe aligned with base contract", () => {
34-
expectTypeOf<SlackProbe>().toMatchTypeOf<BaseProbeResult>();
35-
});
36-
3730
it("uses the bounded lookup client for live directory requests", async () => {
3831
const fixture = "lookup-fixture";
3932
slackClientMocks.authTest.mockResolvedValue({ ok: true, user_id: "U123", user: "bot" });

‎extensions/telegram/src/directory-contract.test.ts‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
// Telegram tests cover directory contract plugin behavior.
2-
import type { BaseProbeResult, BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract";
32
import { expectDirectoryIds } from "openclaw/plugin-sdk/channel-test-helpers";
43
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
54
import { withEnvAsync } from "openclaw/plugin-sdk/test-env";
6-
import { describe, expect, expectTypeOf, it } from "vitest";
5+
import { describe, expect, it } from "vitest";
76
import {
87
listTelegramDirectoryGroupsFromConfig,
98
listTelegramDirectoryPeersFromConfig,
109
} from "../directory-contract-api.js";
11-
import type { TelegramProbe } from "./probe.js";
12-
import type { TelegramTokenResolution } from "./token.js";
13-
1410
describe("Telegram directory contract", () => {
15-
it("keeps public probe and token resolution aligned with base contracts", () => {
16-
expectTypeOf<TelegramProbe>().toMatchTypeOf<BaseProbeResult>();
17-
expectTypeOf<TelegramTokenResolution>().toMatchTypeOf<BaseTokenResolution>();
18-
});
19-
2011
it("lists peers/groups from config", async () => {
2112
const cfg = {
2213
channels: {

0 commit comments

Comments
 (0)