1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-06-02 18:41:37 +03:00

Appease linters.

This commit is contained in:
Kegan Dougal 2015-06-08 10:32:20 +01:00
parent fd8a754ef7
commit 8d8efd037b
2 changed files with 10 additions and 5 deletions

View File

@ -19,7 +19,7 @@ function HttpBackend() {
HttpBackend.prototype = {
/**
* Respond to all of the requests (flush the queue).
* @return Promise resolved when there is nothing left to flush.
* @return {Promise} resolved when there is nothing left to flush.
*/
flush: function() {
var defer = q.defer();
@ -49,13 +49,13 @@ HttpBackend.prototype = {
/**
* Attempts to resolve requests/expected requests.
* @return true if something was resolved.
* @return {boolean} true if something was resolved.
*/
_takeFromQueue: function() {
var req = null;
var i, j;
var matchingReq, expectedReq, testResponse = null;
for (i =0; i < this.requests.length; i++) {
for (i = 0; i < this.requests.length; i++) {
req = this.requests[i];
for (j = 0; j < this.expectedRequests.length; j++) {
expectedReq = this.expectedRequests[j];
@ -85,7 +85,7 @@ HttpBackend.prototype = {
testResponse.err, testResponse.response, testResponse.body
);
}
};
}
if (testResponse) { // flushed something
return true;
}

View File

@ -1,7 +1,12 @@
"use strict";
/**
* Perform common actions before each test case, e.g. printing the test case
* name to stdout.
* @param {TestCase} testCase The test case that is about to be run.
*/
module.exports.beforeEach = function(testCase) {
var desc = testCase.suite.description + " : " + testCase.description;
console.log(desc);
console.log(new Array(1 + desc.length).join("="));
};
};