1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Pass through eslint --fix

This commit is contained in:
Kegan Dougal
2017-01-13 10:49:32 +00:00
parent 97e421306b
commit 7ed65407e6
60 changed files with 3249 additions and 3072 deletions

View File

@@ -15,12 +15,12 @@ limitations under the License.
*/
"use strict";
var q = require("q");
var sdk = require("../..");
var utils = require("../test-utils");
let q = require("q");
let sdk = require("../..");
let utils = require("../test-utils");
var InteractiveAuth = sdk.InteractiveAuth;
var MatrixError = sdk.MatrixError;
let InteractiveAuth = sdk.InteractiveAuth;
let MatrixError = sdk.MatrixError;
describe("InteractiveAuth", function() {
beforeEach(function() {
@@ -28,10 +28,10 @@ describe("InteractiveAuth", function() {
});
it("should start an auth stage and complete it", function(done) {
var doRequest = jasmine.createSpy('doRequest');
var startAuthStage = jasmine.createSpy('startAuthStage');
let doRequest = jasmine.createSpy('doRequest');
let startAuthStage = jasmine.createSpy('startAuthStage');
var ia = new InteractiveAuth({
let ia = new InteractiveAuth({
doRequest: doRequest,
startAuthStage: startAuthStage,
authData: {
@@ -60,7 +60,7 @@ describe("InteractiveAuth", function() {
});
// .. which should trigger a call here
var requestRes = {"a": "b"};
let requestRes = {"a": "b"};
doRequest.andCallFake(function(authData) {
expect(authData).toEqual({
session: "sessionId",
@@ -78,10 +78,10 @@ describe("InteractiveAuth", function() {
});
it("should make a request if no authdata is provided", function(done) {
var doRequest = jasmine.createSpy('doRequest');
var startAuthStage = jasmine.createSpy('startAuthStage');
let doRequest = jasmine.createSpy('doRequest');
let startAuthStage = jasmine.createSpy('startAuthStage');
var ia = new InteractiveAuth({
let ia = new InteractiveAuth({
doRequest: doRequest,
startAuthStage: startAuthStage,
});
@@ -93,7 +93,7 @@ describe("InteractiveAuth", function() {
doRequest.andCallFake(function(authData) {
console.log("request1", authData);
expect(authData).toBe(null);
var err = new MatrixError({
let err = new MatrixError({
session: "sessionId",
flows: [
{ stages: ["logintype"] },
@@ -107,7 +107,7 @@ describe("InteractiveAuth", function() {
});
// .. which should be followed by a call to startAuthStage
var requestRes = {"a": "b"};
let requestRes = {"a": "b"};
startAuthStage.andCallFake(function(stage) {
expect(stage).toEqual("logintype");
expect(ia.getSessionId()).toEqual("sessionId");