You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-31 15:24:23 +03:00
Add remaining stub tests
This commit is contained in:
50
spec/integ/matrix-client-opts.spec.js
Normal file
50
spec/integ/matrix-client-opts.spec.js
Normal file
@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
var sdk = require("../..");
|
||||
var HttpBackend = require("../mock-request");
|
||||
var utils = require("../test-utils");
|
||||
|
||||
describe("MatrixClient opts", function() {
|
||||
var baseUrl = "http://localhost.or.something";
|
||||
var client, httpBackend;
|
||||
var userId = "@alice:localhost";
|
||||
var accessToken = "aseukfgwef";
|
||||
|
||||
beforeEach(function() {
|
||||
utils.beforeEach(this);
|
||||
httpBackend = new HttpBackend();
|
||||
sdk.request(httpBackend.requestFn);
|
||||
client = sdk.createClient({
|
||||
baseUrl: baseUrl,
|
||||
userId: userId,
|
||||
accessToken: accessToken
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
httpBackend.verifyNoOutstandingExpectation();
|
||||
});
|
||||
|
||||
describe("without opts.store", function() {
|
||||
xit("should be able to send messages", function() {
|
||||
|
||||
});
|
||||
|
||||
xit("should be able to sync / get new events", function() {
|
||||
// use 'events' emissions.
|
||||
});
|
||||
});
|
||||
|
||||
describe("without opts.scheduler", function() {
|
||||
xit("shouldn't retry sending events", function() {
|
||||
|
||||
});
|
||||
|
||||
xit("shouldn't queue events", function() {
|
||||
|
||||
});
|
||||
|
||||
xit("should be able to send messages", function() {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
47
spec/integ/matrix-client-retrying.spec.js
Normal file
47
spec/integ/matrix-client-retrying.spec.js
Normal file
@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
var sdk = require("../..");
|
||||
var HttpBackend = require("../mock-request");
|
||||
var utils = require("../test-utils");
|
||||
|
||||
describe("MatrixClient retrying", function() {
|
||||
var baseUrl = "http://localhost.or.something";
|
||||
var client, httpBackend;
|
||||
var userId = "@alice:localhost";
|
||||
var accessToken = "aseukfgwef";
|
||||
|
||||
beforeEach(function() {
|
||||
utils.beforeEach(this);
|
||||
httpBackend = new HttpBackend();
|
||||
sdk.request(httpBackend.requestFn);
|
||||
client = sdk.createClient({
|
||||
baseUrl: baseUrl,
|
||||
userId: userId,
|
||||
accessToken: accessToken
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
httpBackend.verifyNoOutstandingExpectation();
|
||||
});
|
||||
|
||||
xit("should retry according to MatrixScheduler.retryFn", function() {
|
||||
|
||||
});
|
||||
|
||||
xit("should queue according to MatrixScheduler.queueFn", function() {
|
||||
|
||||
});
|
||||
|
||||
xit("should mark events as EventStatus.NOT_SENT when giving up", function() {
|
||||
|
||||
});
|
||||
|
||||
describe("resending", function() {
|
||||
xit("should be able to resend a NOT_SENT event", function() {
|
||||
|
||||
});
|
||||
xit("should be able to resend a sent event", function() {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user