Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 9082e07

Browse files
author
Kerry
authored
include test/utils in tsconfig (#8024)
* fix export-test.tsx Signed-off-by: Kerry Archibald <[email protected]> * include test/utils to tsconfig Signed-off-by: Kerry Archibald <[email protected]>
1 parent 3608fdb commit 9082e07

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/utils/export-test.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
*/
1616

1717
import { renderToString } from "react-dom/server";
18-
import { IContent, MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
18+
import { IContent, MatrixClient, MatrixEvent, Room, RoomMember, RelationType } from "matrix-js-sdk/src/matrix";
1919

2020
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
2121
import { IExportOptions, ExportType, ExportFormat } from "../../src/utils/exportUtils/exportUtils";
@@ -120,13 +120,16 @@ describe('export', function() {
120120
}
121121
// reply events
122122
for (i = 0; i < 10; i++) {
123+
const eventId = "$" + Math.random() + "-" + Math.random();
123124
matrixEvents.push(TestUtilsMatrix.mkEvent({
124125
"content": {
125126
"body": "> <@me:here> Hi\n\nTest",
126127
"format": "org.matrix.custom.html",
127128
"m.relates_to": {
129+
"rel_type": RelationType.Reference,
130+
"event_id": eventId,
128131
"m.in_reply_to": {
129-
"event_id": "$" + Math.random() + "-" + Math.random(),
132+
"event_id": eventId,
130133
},
131134
},
132135
"msgtype": "m.text",
@@ -148,7 +151,7 @@ describe('export', function() {
148151
return "avatar.jpeg";
149152
},
150153
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
151-
},
154+
} as unknown as RoomMember,
152155
ts: ts0 + i*1000,
153156
mship: 'join',
154157
prevMship: 'join',

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
"./src/**/*.tsx" ,
2525
"./test/test-utils/**/*.ts",
2626
"./test/test-utils/**/*.tsx",
27+
"./test/utils/**/*.ts",
28+
"./test/utils/**/*.tsx",
2729
],
2830
}

0 commit comments

Comments
 (0)