1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-31 15:24:23 +03:00

Appease the linter

This commit is contained in:
Travis Ralston
2021-09-25 20:47:59 -06:00
parent 82a254b7bd
commit eab0c54663
3 changed files with 6 additions and 6 deletions

View File

@ -247,7 +247,7 @@ describe("MSC3089Branch", () => {
const fileContents = "contents go here"; const fileContents = "contents go here";
const canaryContents = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); const canaryContents = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i)));
const canaryFile = {} as IEncryptedFile; const canaryFile = {} as IEncryptedFile;
const canaryAddl = {canary: true}; const canaryAddl = { canary: true };
indexEvent.getContent = () => ({ active: true, retained: true }); indexEvent.getContent = () => ({ active: true, retained: true });
const stateKeyOrder = [fileEventId2, fileEventId]; const stateKeyOrder = [fileEventId2, fileEventId];
const stateFn = jest.fn() const stateFn = jest.fn()
@ -316,7 +316,7 @@ describe("MSC3089Branch", () => {
replacingEventId: () => null, replacingEventId: () => null,
getId: () => "$unknown", getId: () => "$unknown",
}]; }];
staticRoom.getLiveTimeline = () => ({getEvents: () => events}) as EventTimeline; staticRoom.getLiveTimeline = () => ({ getEvents: () => events }) as EventTimeline;
directory.getFile = (evId: string) => { directory.getFile = (evId: string) => {
expect(evId).toEqual(fileEventId); expect(evId).toEqual(fileEventId);

View File

@ -933,7 +933,7 @@ describe("MSC3089TreeSpace", () => {
const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i)));
// We clone the file info just to make sure it doesn't get mutated for the test. // We clone the file info just to make sure it doesn't get mutated for the test.
const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), {metadata: true}); const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), { metadata: true });
expect(result).toMatchObject({ event_id: fileEventId }); expect(result).toMatchObject({ event_id: fileEventId });
expect(uploadFn).toHaveBeenCalledTimes(1); expect(uploadFn).toHaveBeenCalledTimes(1);
@ -1000,7 +1000,7 @@ describe("MSC3089TreeSpace", () => {
const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i)));
// We clone the file info just to make sure it doesn't get mutated for the test. // We clone the file info just to make sure it doesn't get mutated for the test.
const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), {"m.new_content": true}); const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), { "m.new_content": true });
expect(result).toMatchObject({ event_id: fileEventId }); expect(result).toMatchObject({ event_id: fileEventId });
expect(uploadFn).toHaveBeenCalledTimes(1); expect(uploadFn).toHaveBeenCalledTimes(1);

View File

@ -15,7 +15,7 @@ limitations under the License.
*/ */
import { MatrixClient } from "../client"; import { MatrixClient } from "../client";
import { EventType, IEncryptedFile, RelationType, UNSTABLE_MSC3089_BRANCH } from "../@types/event"; import { IEncryptedFile, RelationType, UNSTABLE_MSC3089_BRANCH } from "../@types/event";
import { IContent, MatrixEvent } from "./event"; import { IContent, MatrixEvent } from "./event";
import { MSC3089TreeSpace } from "./MSC3089TreeSpace"; import { MSC3089TreeSpace } from "./MSC3089TreeSpace";
@ -211,7 +211,7 @@ export class MSC3089Branch {
break; // prevent infinite loop break; // prevent infinite loop
} }
} }
} while(!!childEvent); } while (childEvent);
return fileHistory; return fileHistory;
} }