@checkstack/integration-webex-backend 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +4 -4
- package/src/provider.test.ts +16 -6
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/integration-webex-backend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"checkstack": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"lint:code": "eslint . --max-warnings 0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@checkstack/backend-api": "0.11.
|
|
16
|
-
"@checkstack/integration-backend": "0.1.
|
|
17
|
-
"@checkstack/common": "0.6.
|
|
15
|
+
"@checkstack/backend-api": "0.11.1",
|
|
16
|
+
"@checkstack/integration-backend": "0.1.18",
|
|
17
|
+
"@checkstack/common": "0.6.5",
|
|
18
18
|
"zod": "^4.2.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
package/src/provider.test.ts
CHANGED
|
@@ -153,13 +153,23 @@ describe("Webex Integration Provider", () => {
|
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
it("returns failure for invalid config", async () => {
|
|
156
|
-
//
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
// Explicitly mock fetch to simulate network error for empty token
|
|
157
|
+
const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
|
|
158
|
+
(async () => {
|
|
159
|
+
throw new TypeError("fetch failed");
|
|
160
|
+
}) as unknown as typeof fetch
|
|
161
|
+
);
|
|
160
162
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
try {
|
|
164
|
+
const result = await webexProvider.testConnection!({
|
|
165
|
+
botToken: "",
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
expect(result.success).toBe(false);
|
|
169
|
+
expect(result.message).toContain("failed");
|
|
170
|
+
} finally {
|
|
171
|
+
mockFetch.mockRestore();
|
|
172
|
+
}
|
|
163
173
|
});
|
|
164
174
|
});
|
|
165
175
|
|