From cf1b592f2615fa148272973bf2b2d95a781048df Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 14 Oct 2022 15:57:12 +0100
Subject: [PATCH] Update overly sensitive snapshot (#9421)
* Update snapshot
* Fix tests by adding missing stub
---
.../__snapshots__/BeaconMarker-test.tsx.snap | 36 ++++++++-----------
test/test-utils/test-utils.ts | 1 +
2 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap b/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap
index 291a64349f..5bb297fc40 100644
--- a/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap
+++ b/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap
@@ -106,20 +106,18 @@ exports[` renders marker when beacon has location 1`] = `
"_eventsCount": 0,
"_isOutOfBand": false,
"_maxListeners": undefined,
- "_modified": 1647270879403,
- "_requestedProfileInfo": undefined,
"disambiguate": false,
- "events": Object {
- "member": null,
- },
- "membership": null,
+ "events": Object {},
+ "membership": undefined,
+ "modified": 1647270879403,
"name": "@alice:server",
"powerLevel": 0,
"powerLevelNorm": 0,
"rawDisplayName": "@alice:server",
+ "requestedProfileInfo": false,
"roomId": "!room:server",
"typing": false,
- "user": null,
+ "user": undefined,
"userId": "@alice:server",
Symbol(kCapture): false,
}
@@ -135,20 +133,18 @@ exports[` renders marker when beacon has location 1`] = `
"_eventsCount": 0,
"_isOutOfBand": false,
"_maxListeners": undefined,
- "_modified": 1647270879403,
- "_requestedProfileInfo": undefined,
"disambiguate": false,
- "events": Object {
- "member": null,
- },
- "membership": null,
+ "events": Object {},
+ "membership": undefined,
+ "modified": 1647270879403,
"name": "@alice:server",
"powerLevel": 0,
"powerLevelNorm": 0,
"rawDisplayName": "@alice:server",
+ "requestedProfileInfo": false,
"roomId": "!room:server",
"typing": false,
- "user": null,
+ "user": undefined,
"userId": "@alice:server",
Symbol(kCapture): false,
}
@@ -172,20 +168,18 @@ exports[` renders marker when beacon has location 1`] = `
"_eventsCount": 0,
"_isOutOfBand": false,
"_maxListeners": undefined,
- "_modified": 1647270879403,
- "_requestedProfileInfo": undefined,
"disambiguate": false,
- "events": Object {
- "member": null,
- },
- "membership": null,
+ "events": Object {},
+ "membership": undefined,
+ "modified": 1647270879403,
"name": "@alice:server",
"powerLevel": 0,
"powerLevelNorm": 0,
"rawDisplayName": "@alice:server",
+ "requestedProfileInfo": false,
"roomId": "!room:server",
"typing": false,
- "user": null,
+ "user": undefined,
"userId": "@alice:server",
Symbol(kCapture): false,
}
diff --git a/test/test-utils/test-utils.ts b/test/test-utils/test-utils.ts
index d04324c8ca..4549190600 100644
--- a/test/test-utils/test-utils.ts
+++ b/test/test-utils/test-utils.ts
@@ -184,6 +184,7 @@ export function createTestClient(): MatrixClient {
setAudioInput: jest.fn(),
} as unknown as MediaHandler),
uploadContent: jest.fn(),
+ getEventMapper: () => (opts) => new MatrixEvent(opts),
} as unknown as MatrixClient;
client.reEmitter = new ReEmitter(client);