mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten pairing provider assertions
This commit is contained in:
@@ -3213,7 +3213,9 @@ describe("MatrixClient crypto bootstrapping", () => {
|
||||
expect(result.success).toBe(true);
|
||||
expect(result.verification.verified).toBe(true);
|
||||
expect(result.crossSigning.published).toBe(true);
|
||||
expect(result.cryptoBootstrap).not.toBeNull();
|
||||
if (!result.cryptoBootstrap) {
|
||||
throw new Error("expected Matrix crypto bootstrap result");
|
||||
}
|
||||
});
|
||||
|
||||
it("reports bootstrap failure when the device is only locally trusted", async () => {
|
||||
|
||||
@@ -200,8 +200,10 @@ describe("setup surface helpers", () => {
|
||||
);
|
||||
|
||||
// Should return config with username and clientId
|
||||
expect(result).not.toBeNull();
|
||||
const defaultAccount = result?.cfg.channels?.twitch?.accounts?.default as
|
||||
if (!result) {
|
||||
throw new Error("expected Twitch env-token setup result");
|
||||
}
|
||||
const defaultAccount = result.cfg.channels?.twitch?.accounts?.default as
|
||||
| { username?: string; clientId?: string }
|
||||
| undefined;
|
||||
expect(defaultAccount?.username).toBe("testbot");
|
||||
|
||||
@@ -83,7 +83,6 @@ function requireFirstPairingRequest(
|
||||
) {
|
||||
expect(requests).toHaveLength(1);
|
||||
const [request] = requests;
|
||||
expect(request).toBeDefined();
|
||||
if (!request) {
|
||||
throw new Error("expected pairing request");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user