Merge pull request #35 from MillenniumEarl/deepsource-fix-dc58783a
Replace variables with constpull/36/head
						commit
						1cdbafb4cf
					
				| 
						 | 
					@ -503,13 +503,13 @@ async function loginF95(browser, username, password) {
 | 
				
			||||||
  let message = "";
 | 
					  let message = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Check if the user is logged in
 | 
					  // Check if the user is logged in
 | 
				
			||||||
  let success = await page.evaluate(
 | 
					  const success = await page.evaluate(
 | 
				
			||||||
    /* istanbul ignore next */ (selector) =>
 | 
					    /* istanbul ignore next */ (selector) =>
 | 
				
			||||||
      document.querySelector(selector) !== null,
 | 
					      document.querySelector(selector) !== null,
 | 
				
			||||||
    selectorK.AVATAR_INFO
 | 
					    selectorK.AVATAR_INFO
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let errorMessageExists = await page.evaluate(
 | 
					  const errorMessageExists = await page.evaluate(
 | 
				
			||||||
    /* istanbul ignore next */
 | 
					    /* istanbul ignore next */
 | 
				
			||||||
    (selector) => document.querySelector(selector) !== null,
 | 
					    (selector) => document.querySelector(selector) !== null,
 | 
				
			||||||
    selectorK.LOGIN_MESSAGE_ERROR
 | 
					    selectorK.LOGIN_MESSAGE_ERROR
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ module.exports.urlExists = async function (url, checkRedirect) {
 | 
				
			||||||
  if (!valid) return false;
 | 
					  if (!valid) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (checkRedirect) {
 | 
					  if (checkRedirect) {
 | 
				
			||||||
    let redirectUrl = await exports.getUrlRedirect(url);
 | 
					    const redirectUrl = await exports.getUrlRedirect(url);
 | 
				
			||||||
    if (redirectUrl === url) valid = true;
 | 
					    if (redirectUrl === url) valid = true;
 | 
				
			||||||
    else valid = false;
 | 
					    else valid = false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -172,8 +172,8 @@ describe("Search game data", function () {
 | 
				
			||||||
    expect(result, "Without being logged should return null").to.be.null;
 | 
					    expect(result, "Without being logged should return null").to.be.null;
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  it("Test game serialization", function () {
 | 
					  it("Test game serialization", function () {
 | 
				
			||||||
    let json = JSON.stringify(testGame);
 | 
					    const json = JSON.stringify(testGame);
 | 
				
			||||||
    let parsedGameInfo = JSON.parse(json);
 | 
					    const parsedGameInfo = JSON.parse(json);
 | 
				
			||||||
    expect(parsedGameInfo).to.be.equal(testGame);
 | 
					    expect(parsedGameInfo).to.be.equal(testGame);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue