From 5095bc0427a173b26db06af5823cb21edee39baa Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 30 Jan 2023 15:52:38 +0000 Subject: [PATCH] Fix new tests introduced by html export tweaks (#10022) --- test/utils/exportUtils/HTMLExport-test.ts | 2 +- .../utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/utils/exportUtils/HTMLExport-test.ts b/test/utils/exportUtils/HTMLExport-test.ts index 607dfbdbdc..e9770351e9 100644 --- a/test/utils/exportUtils/HTMLExport-test.ts +++ b/test/utils/exportUtils/HTMLExport-test.ts @@ -286,7 +286,7 @@ describe("HTMLExport", () => { // Ensure that the attachment is present const files = getFiles(exporter); - const file = files["files/hello-1-1-1970 at 12-00-00 AM.txt"]; + const file = files[Object.keys(files).find((k) => k.endsWith(".txt"))]; expect(file).not.toBeUndefined(); // Ensure that the attachment has the expected content diff --git a/test/utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap b/test/utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap index c47170d3ed..0645a993ae 100644 --- a/test/utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap +++ b/test/utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap @@ -25,7 +25,7 @@ exports[`HTMLExport should export 1`] = `
created this room.
This is the start of export of !myroom:example.org. Exported by @userId:matrix.org at 2022/11/17.