1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-06-05 17:16:47 +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 = { HttpBackend.prototype = {
/** /**
* Respond to all of the requests (flush the queue). * 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() { flush: function() {
var defer = q.defer(); var defer = q.defer();
@ -49,13 +49,13 @@ HttpBackend.prototype = {
/** /**
* Attempts to resolve requests/expected requests. * Attempts to resolve requests/expected requests.
* @return true if something was resolved. * @return {boolean} true if something was resolved.
*/ */
_takeFromQueue: function() { _takeFromQueue: function() {
var req = null; var req = null;
var i, j; var i, j;
var matchingReq, expectedReq, testResponse = null; 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]; req = this.requests[i];
for (j = 0; j < this.expectedRequests.length; j++) { for (j = 0; j < this.expectedRequests.length; j++) {
expectedReq = this.expectedRequests[j]; expectedReq = this.expectedRequests[j];
@ -85,7 +85,7 @@ HttpBackend.prototype = {
testResponse.err, testResponse.response, testResponse.body testResponse.err, testResponse.response, testResponse.body
); );
} }
}; }
if (testResponse) { // flushed something if (testResponse) { // flushed something
return true; return true;
} }

View File

@ -1,7 +1,12 @@
"use strict"; "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) { module.exports.beforeEach = function(testCase) {
var desc = testCase.suite.description + " : " + testCase.description; var desc = testCase.suite.description + " : " + testCase.description;
console.log(desc); console.log(desc);
console.log(new Array(1 + desc.length).join("=")); console.log(new Array(1 + desc.length).join("="));
}; };