You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Linting
This commit is contained in:
@@ -90,15 +90,15 @@ describe("SlidingSync", () => {
|
|||||||
required_state: [["m.room.create", ""]],
|
required_state: [["m.room.create", ""]],
|
||||||
};
|
};
|
||||||
const listInfo = {
|
const listInfo = {
|
||||||
ranges: [[0,10]],
|
ranges: [[0, 10]],
|
||||||
filters: {
|
filters: {
|
||||||
is_dm: true,
|
is_dm: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const ext = {
|
const ext = {
|
||||||
name: () => "custom_extension",
|
name: () => "custom_extension",
|
||||||
onRequest: (initial) => { return { initial: initial } },
|
onRequest: (initial) => { return { initial: initial }; },
|
||||||
onResponse: (res) => { return {} },
|
onResponse: (res) => { return {}; },
|
||||||
when: () => ExtensionState.PreProcess,
|
when: () => ExtensionState.PreProcess,
|
||||||
};
|
};
|
||||||
slidingSync.modifyRoomSubscriptions(new Set([roomId]));
|
slidingSync.modifyRoomSubscriptions(new Set([roomId]));
|
||||||
@@ -117,7 +117,7 @@ describe("SlidingSync", () => {
|
|||||||
});
|
});
|
||||||
expect(body.lists[0]).toEqual(listInfo);
|
expect(body.lists[0]).toEqual(listInfo);
|
||||||
expect(body.extensions).toBeTruthy();
|
expect(body.extensions).toBeTruthy();
|
||||||
expect(body.extensions["custom_extension"]).toEqual({initial:true});
|
expect(body.extensions["custom_extension"]).toEqual({ initial: true });
|
||||||
txnId = body.txn_id;
|
txnId = body.txn_id;
|
||||||
}).respond(200, function() {
|
}).respond(200, function() {
|
||||||
return {
|
return {
|
||||||
@@ -135,10 +135,10 @@ describe("SlidingSync", () => {
|
|||||||
logger.debug("got ", body);
|
logger.debug("got ", body);
|
||||||
expect(body.room_subscriptions).toBeFalsy();
|
expect(body.room_subscriptions).toBeFalsy();
|
||||||
expect(body.lists[0]).toEqual({
|
expect(body.lists[0]).toEqual({
|
||||||
ranges: [[0,10]],
|
ranges: [[0, 10]],
|
||||||
});
|
});
|
||||||
expect(body.extensions).toBeTruthy();
|
expect(body.extensions).toBeTruthy();
|
||||||
expect(body.extensions["custom_extension"]).toEqual({initial:false});
|
expect(body.extensions["custom_extension"]).toEqual({ initial: false });
|
||||||
}).respond(200, function() {
|
}).respond(200, function() {
|
||||||
return {
|
return {
|
||||||
pos: "12",
|
pos: "12",
|
||||||
@@ -166,7 +166,7 @@ describe("SlidingSync", () => {
|
|||||||
});
|
});
|
||||||
expect(body.lists[0]).toEqual(listInfo);
|
expect(body.lists[0]).toEqual(listInfo);
|
||||||
expect(body.extensions).toBeTruthy();
|
expect(body.extensions).toBeTruthy();
|
||||||
expect(body.extensions["custom_extension"]).toEqual({initial:true});
|
expect(body.extensions["custom_extension"]).toEqual({ initial: true });
|
||||||
}).respond(200, function() {
|
}).respond(200, function() {
|
||||||
return {
|
return {
|
||||||
pos: "1",
|
pos: "1",
|
||||||
|
Reference in New Issue
Block a user