mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:08:26 +00:00
test(gateway): use lightweight clears in client close setup
This commit is contained in:
@@ -185,10 +185,11 @@ describe("GatewayClient security checks", () => {
|
|||||||
describe("GatewayClient close handling", () => {
|
describe("GatewayClient close handling", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wsInstances.length = 0;
|
wsInstances.length = 0;
|
||||||
clearDeviceAuthTokenMock.mockReset();
|
clearDeviceAuthTokenMock.mockClear();
|
||||||
clearDevicePairingMock.mockReset();
|
clearDeviceAuthTokenMock.mockImplementation(() => undefined);
|
||||||
|
clearDevicePairingMock.mockClear();
|
||||||
clearDevicePairingMock.mockResolvedValue(true);
|
clearDevicePairingMock.mockResolvedValue(true);
|
||||||
logDebugMock.mockReset();
|
logDebugMock.mockClear();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("clears stale token on device token mismatch close", () => {
|
it("clears stale token on device token mismatch close", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user