You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Set Room.oldState.paginationToken to null at the start of the timeline. Fix linting errors.
This commit is contained in:
@@ -73,17 +73,14 @@ describe("MatrixClient room timelines", function() {
|
||||
});
|
||||
|
||||
describe("local echo events", function() {
|
||||
var sendEvent = utils.mkMessage({
|
||||
room: roomId, user: otherUserId, msg: "hello"
|
||||
});
|
||||
|
||||
it("should be added immediately after calling MatrixClient.sendEvent "+
|
||||
it("should be added immediately after calling MatrixClient.sendEvent " +
|
||||
"with EventStatus.SENDING and the right event.sender", function(done) {
|
||||
client.on("syncComplete", function() {
|
||||
var room = client.getRoom(roomId);
|
||||
expect(room.timeline.length).toEqual(1);
|
||||
|
||||
var promise = client.sendTextMessage(roomId, "I am a fish", "txn1");
|
||||
client.sendTextMessage(roomId, "I am a fish", "txn1");
|
||||
// check it was added
|
||||
expect(room.timeline.length).toEqual(2);
|
||||
// check status
|
||||
@@ -95,13 +92,13 @@ describe("MatrixClient room timelines", function() {
|
||||
|
||||
httpBackend.flush("/events", 1).done(function() {
|
||||
done();
|
||||
})
|
||||
});
|
||||
});
|
||||
client.startClient();
|
||||
httpBackend.flush("/initialSync", 1);
|
||||
});
|
||||
|
||||
it("should be updated correctly when the send request finishes "+
|
||||
it("should be updated correctly when the send request finishes " +
|
||||
"BEFORE the event comes down the event stream", function(done) {
|
||||
var eventId = "$foo:bar";
|
||||
httpBackend.when("PUT", "/txn1").respond(200, {
|
||||
@@ -130,7 +127,7 @@ describe("MatrixClient room timelines", function() {
|
||||
httpBackend.flush("/initialSync", 1);
|
||||
});
|
||||
|
||||
it("should be updated correctly when the send request finishes "+
|
||||
it("should be updated correctly when the send request finishes " +
|
||||
"AFTER the event comes down the event stream", function(done) {
|
||||
var eventId = "$foo:bar";
|
||||
httpBackend.when("PUT", "/txn1").respond(200, {
|
||||
@@ -156,7 +153,7 @@ describe("MatrixClient room timelines", function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
client.startClient();
|
||||
httpBackend.flush("/initialSync", 1);
|
||||
@@ -170,4 +167,4 @@ describe("MatrixClient room timelines", function() {
|
||||
describe("new events", function() {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -27,7 +27,9 @@ HttpBackend.prototype = {
|
||||
var defer = q.defer();
|
||||
var self = this;
|
||||
var flushed = 0;
|
||||
console.log("HTTP backend flushing... (path=%s numToFlush=%s)", path, numToFlush);
|
||||
console.log(
|
||||
"HTTP backend flushing... (path=%s numToFlush=%s)", path, numToFlush
|
||||
);
|
||||
var tryFlush = function() {
|
||||
// if there's more real requests and more expected requests, flush 'em.
|
||||
console.log(
|
||||
|
Reference in New Issue
Block a user