Skip to content

Commit

Permalink
Improve code style 🕵️
Browse files Browse the repository at this point in the history
  • Loading branch information
checkerschaf committed Nov 10, 2020
1 parent 5c7b568 commit 1d9dab2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/scripts/update-sites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const removeBuggySites = (sites: SiteList): SiteList => {
"ProductHunt", // Super slow
];

for (let site of sitesToRemove) {
for (const site of sitesToRemove) {
delete sites[site];
}

Expand Down
4 changes: 2 additions & 2 deletions tests/sites/all-sites.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const getClaimedUsername = (site: Site) => site.username_claimed ?? "JohnDoe";

const generateRandomString = (strLength = 12) => {
let result = "";
let characters = "abcdefghijklmnopqrstuvwxyz0123456789";
let charactersLength = characters.length;
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
const charactersLength = characters.length;
for (let i = 0; i < strLength; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
Expand Down
6 changes: 3 additions & 3 deletions tests/testing-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ const url = "http://localhost/users/{}/hello";
const siteStatusCode: Site = {
url,
errorType: SiteErrorType.status_code,
username_claimed: testUsername,
"username_claimed": testUsername,
};
const siteStatusMessage: Site = {
url,
errorType: SiteErrorType.message,
errorMsg: "User not found",
username_claimed: testUsername,
"username_claimed": testUsername,
};
const siteRedirect: Site = {
url,
errorType: SiteErrorType.response_url,
errorUrl: "http://localhost/redirect-to-error",
username_claimed: testUsername,
"username_claimed": testUsername,
};

export {
Expand Down

0 comments on commit 1d9dab2

Please sign in to comment.