include test/utils in tsconfig (#8024)
* fix export-test.tsx Signed-off-by: Kerry Archibald <kerrya@element.io> * include test/utils to tsconfig Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
3608fdb2ae
commit
9082e07ff4
2 changed files with 8 additions and 3 deletions
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { renderToString } from "react-dom/server";
|
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 { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||||
import { IExportOptions, ExportType, ExportFormat } from "../../src/utils/exportUtils/exportUtils";
|
import { IExportOptions, ExportType, ExportFormat } from "../../src/utils/exportUtils/exportUtils";
|
||||||
|
@ -120,13 +120,16 @@ describe('export', function() {
|
||||||
}
|
}
|
||||||
// reply events
|
// reply events
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
|
const eventId = "$" + Math.random() + "-" + Math.random();
|
||||||
matrixEvents.push(TestUtilsMatrix.mkEvent({
|
matrixEvents.push(TestUtilsMatrix.mkEvent({
|
||||||
"content": {
|
"content": {
|
||||||
"body": "> <@me:here> Hi\n\nTest",
|
"body": "> <@me:here> Hi\n\nTest",
|
||||||
"format": "org.matrix.custom.html",
|
"format": "org.matrix.custom.html",
|
||||||
"m.relates_to": {
|
"m.relates_to": {
|
||||||
|
"rel_type": RelationType.Reference,
|
||||||
|
"event_id": eventId,
|
||||||
"m.in_reply_to": {
|
"m.in_reply_to": {
|
||||||
"event_id": "$" + Math.random() + "-" + Math.random(),
|
"event_id": eventId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"msgtype": "m.text",
|
"msgtype": "m.text",
|
||||||
|
@ -148,7 +151,7 @@ describe('export', function() {
|
||||||
return "avatar.jpeg";
|
return "avatar.jpeg";
|
||||||
},
|
},
|
||||||
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
|
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
|
||||||
},
|
} as unknown as RoomMember,
|
||||||
ts: ts0 + i*1000,
|
ts: ts0 + i*1000,
|
||||||
mship: 'join',
|
mship: 'join',
|
||||||
prevMship: 'join',
|
prevMship: 'join',
|
||||||
|
|
|
@ -24,5 +24,7 @@
|
||||||
"./src/**/*.tsx" ,
|
"./src/**/*.tsx" ,
|
||||||
"./test/test-utils/**/*.ts",
|
"./test/test-utils/**/*.ts",
|
||||||
"./test/test-utils/**/*.tsx",
|
"./test/test-utils/**/*.tsx",
|
||||||
|
"./test/utils/**/*.ts",
|
||||||
|
"./test/utils/**/*.tsx",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue