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

include test/utils in tsconfig #8024

Merged
merged 3 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/utils/export-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

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

import { MatrixClientPeg } from "../../src/MatrixClientPeg";
import { IExportOptions, ExportType, ExportFormat } from "../../src/utils/exportUtils/exportUtils";
Expand Down Expand Up @@ -120,13 +120,16 @@ describe('export', function() {
}
// reply events
for (i = 0; i < 10; i++) {
const eventId = "$" + Math.random() + "-" + Math.random();
matrixEvents.push(TestUtilsMatrix.mkEvent({
"content": {
"body": "> <@me:here> Hi\n\nTest",
"format": "org.matrix.custom.html",
"m.relates_to": {
"rel_type": RelationType.Reference,
"event_id": eventId,
"m.in_reply_to": {
"event_id": "$" + Math.random() + "-" + Math.random(),
"event_id": eventId,
},
},
"msgtype": "m.text",
Expand All @@ -148,7 +151,7 @@ describe('export', function() {
return "avatar.jpeg";
},
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
},
} as unknown as RoomMember,
ts: ts0 + i*1000,
mship: 'join',
prevMship: 'join',
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
"./src/**/*.tsx" ,
"./test/test-utils/**/*.ts",
"./test/test-utils/**/*.tsx",
"./test/utils/**/*.ts",
"./test/utils/**/*.tsx",
],
}