This commit is contained in:
James Salter 2021-07-28 11:28:19 +01:00
parent c697079eb4
commit 7c62386915
2 changed files with 16 additions and 16 deletions

View File

@ -24,7 +24,7 @@ interface IEvent {
eventName: string;
// The properties of the event that will be stored in PostHog.
properties: {}
properties: {};
}
export enum Anonymity {
@ -44,19 +44,19 @@ export interface IPseudonymousEvent extends IEvent {}
export interface IAnonymousEvent extends IEvent {}
export interface IRoomEvent extends IPseudonymousEvent {
hashedRoomId: string
hashedRoomId: string;
}
interface IPageView extends IAnonymousEvent {
eventName: "$pageview",
eventName: "$pageview";
properties: {
durationMs?: number
screen?: string
}
durationMs?: number;
screen?: string;
};
}
export interface IWelcomeScreenLoad extends IAnonymousEvent {
eventName: "welcome_screen_load",
eventName: "welcome_screen_load";
}
const hashHex = async (input: string): Promise<string> => {

View File

@ -20,24 +20,24 @@ class FakePosthog {
}
export interface ITestEvent extends IAnonymousEvent {
key: "jest_test_event",
key: "jest_test_event";
properties: {
foo: string
}
foo: string;
};
}
export interface ITestPseudonymousEvent extends IPseudonymousEvent {
key: "jest_test_pseudo_event",
key: "jest_test_pseudo_event";
properties: {
foo: string
}
foo: string;
};
}
export interface ITestRoomEvent extends IRoomEvent {
key: "jest_test_room_event",
key: "jest_test_room_event";
properties: {
foo: string
}
foo: string;
};
}
describe("PosthogAnalytics", () => {