1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Add test for silently ignoring messages when not initialised

This commit is contained in:
James Salter
2021-07-21 07:42:55 +01:00
parent d4550c1a28
commit 3135e42586

View File

@ -81,4 +81,12 @@ describe("PosthogAnalytics", () => {
});
});
});
it("Should silently not send messages if not inititalised", () => {
analytics.track<ITestEvent>("jest_test_event", {
foo: "bar",
});
expect(fakePosthog.capture.mock.calls.length).toBe(0);
});
});