diff --git a/HOW_IT_WORKS.md b/HOW_IT_WORKS.md index 13aa044c..de5f0102 100644 --- a/HOW_IT_WORKS.md +++ b/HOW_IT_WORKS.md @@ -12,7 +12,7 @@ `@octokit/fixtures` provides fixtures that can be used by automated tests for GitHub API clients. -The fixtures are recorded programatically +The fixtures are recorded programmatically by sending requests against the [GitHub REST API](https://developer.github.com/v3/) and recording both requests and responses into JSON files. Each scenario has their own folder in the [scenarios// folder](scenarios/)). Each of these folders contains 4 files: @@ -91,7 +91,7 @@ of the `@octokit/fixtures` package and notify developers of the update. - **All IDs are set to 1000** or above. The ID increments for each entity of the same type within the same scenario - **All Node IDs are set to `MDA6RW50aXR5MQ==`** which is the base64 string for `00:Entity1`. -- **Tokens Authorization Header are zerofied** ending with the token number, see [environment variables below](CONTRIBUTING.md#test-users--organization--tokens) +- **Tokens Authorization Header are zeros** ending with the token number, see [environment variables below](CONTRIBUTING.md#test-users--organization--tokens) e.g. `FIXTURES_USER_A_TOKEN_FULL_ACCESS` becomes `0000000000000000000000000000000000000001`, `FIXTURES_USER_B_TOKEN_FULL_ACCESS` becomes `0000000000000000000000000000000000000002`, etc - **All timestamps are set to the time of the GitHub Universe 2017 keynote** @@ -111,10 +111,10 @@ of the `@octokit/fixtures` package and notify developers of the update. - **URLs containing temporary repository names** in response properties, paths and location header are renamed, e.g. `tmp-scenario-create-file-20170930034241803` is renamed to `create-file`. -- **Commit sha hashes** are zerofied with a counter, +- **Commit sha hashes** are zeros with a counter, e.g. `3f3f005b29247e51a4f4d6b8ce07b67646cd6074` becomes `0000000000000000000000000000000000000001`, the next unique commit sha becomes `0000000000000000000000000000000000000002`, etc. -- **GitHub Request IDs** are zerofied, +- **GitHub Request IDs** are zeros, e.g. `DDA3:292D9:5B9AC0:62137E:5A022DD0` becomes `0000:00000:0000000:0000000:00000000` ## Cron job diff --git a/lib/fixturize-commit-sha.js b/lib/fixturize-commit-sha.js index df566324..d2250377 100644 --- a/lib/fixturize-commit-sha.js +++ b/lib/fixturize-commit-sha.js @@ -1,6 +1,6 @@ export default fixturizeCommitSha; -// We keep track of commit sha hashes. We don’t want to simply zerofy them as +// We keep track of commit sha hashes. We don’t want to simply zero them as // there can be multiple commits. So instead we keep state of a counter and // pad the counter with 0s left. function fixturizeCommitSha(map, sha) { diff --git a/lib/normalize/archive.js b/lib/normalize/archive.js index 1a4b821d..a79d7387 100644 --- a/lib/normalize/archive.js +++ b/lib/normalize/archive.js @@ -15,7 +15,7 @@ async function normalizeArchive(scenarioState, response, fixture) { ] // normalize folder name in file name .replace(regex, "$1") - // zerofy sha + // zero sha .replace(/archive-\w{7}/, "archive-0000000"); const extract = _extract(); @@ -31,7 +31,7 @@ async function normalizeArchive(scenarioState, response, fixture) { header.name = header.name // normalize folder name in path .replace(regex, "$1") - // zerofy sha in path + // zero sha in path .replace(/-(\w){7}\//, "-0000000/"); // normalize mtime diff --git a/lib/normalize/error.js b/lib/normalize/error.js index cc209ea0..28a81e07 100644 --- a/lib/normalize/error.js +++ b/lib/normalize/error.js @@ -3,6 +3,6 @@ export default normalizeContent; import setIfExists from "../set-if-exists.js"; function normalizeContent(scenarioState, response) { - // zerofy request ID + // zero request ID setIfExists(response, "request_id", "0000:00000:0000000:0000000:00000000"); } diff --git a/lib/normalize/index.js b/lib/normalize/index.js index edba8bd3..14364c34 100644 --- a/lib/normalize/index.js +++ b/lib/normalize/index.js @@ -44,7 +44,7 @@ async function normalize(scenarioState, fixture) { // Set used rate limit to 1 setIfExists(fixture.headers, "x-ratelimit-used", 1); - // zerofy random stuff + // zero random stuff setIfExists(fixture.headers, "etag", '"00000000000000000000000000000000"'); setIfExists(fixture.headers, "x-runtime-rack", "0.000000"); setIfExists( @@ -136,7 +136,7 @@ async function normalize(scenarioState, fixture) { } } - // remove varnishs header if present + // remove varnish headers if present setIfExists(fixture.headers, "x-varnish", "1000"); setIfExists(fixture.headers, "age", "0"); diff --git a/lib/remove-credentials.js b/lib/remove-credentials.js index 4cfed231..fa352a21 100644 --- a/lib/remove-credentials.js +++ b/lib/remove-credentials.js @@ -10,7 +10,7 @@ const tokenToFixture = { }; function removeCredentials(fixture) { - // zerofy auth token + // zero auth token fixture.reqheaders.authorization = ( fixture.reqheaders.authorization || "" ).replace(/^token (\w{40})$/, (_, token) => { diff --git a/scenarios/api.github.com/add-and-remove-repository-collaborator/record.js b/scenarios/api.github.com/add-and-remove-repository-collaborator/record.js index 5c71b1c3..d88d67b3 100644 --- a/scenarios/api.github.com/add-and-remove-repository-collaborator/record.js +++ b/scenarios/api.github.com/add-and-remove-repository-collaborator/record.js @@ -1,4 +1,4 @@ -export default addAndRemoveRepostioryCollaborator; +export default addAndRemoveRepositoryCollaborator; import env from "../../../lib/env.js"; import getTemporaryRepository from "../../../lib/temporary-repository.js"; @@ -9,7 +9,7 @@ import getTemporaryRepository from "../../../lib/temporary-repository.js"; // - As user A, list collaborators (now includes user B) // - As user A, remove user B as collaborator from repository // - As user A, list collaborators (no longer includes user B) -async function addAndRemoveRepostioryCollaborator(state) { +async function addAndRemoveRepositoryCollaborator(state) { // create a temporary repository const temporaryRepository = getTemporaryRepository({ request: state.request, diff --git a/scenarios/api.github.com/add-labels-to-issue/record.js b/scenarios/api.github.com/add-labels-to-issue/record.js index 1d5fba76..c81f0753 100644 --- a/scenarios/api.github.com/add-labels-to-issue/record.js +++ b/scenarios/api.github.com/add-labels-to-issue/record.js @@ -1,10 +1,10 @@ -export default addAndRemoveRepostioryCollaborator; +export default addAndRemoveRepositoryCollaborator; import env from "../../../lib/env.js"; import getTemporaryRepository from "../../../lib/temporary-repository.js"; // - create issue // - add labels to issue -async function addAndRemoveRepostioryCollaborator(state) { +async function addAndRemoveRepositoryCollaborator(state) { let error; // create a temporary repository const temporaryRepository = getTemporaryRepository({ diff --git a/scenarios/api.github.com/git-refs/record.js b/scenarios/api.github.com/git-refs/record.js index 2478e15e..a3ad3935 100644 --- a/scenarios/api.github.com/git-refs/record.js +++ b/scenarios/api.github.com/git-refs/record.js @@ -16,7 +16,7 @@ async function gitRefs(state) { try { // https://developer.github.com/v3/repos/contents/#create-a-file - // (these requests get ignored, we need two commits to test our refrences) + // (these requests get ignored, we need two commits to test our references) const { data: { commit: { sha: sha1 }, diff --git a/scenarios/api.github.com/project-cards/raw-fixture.json b/scenarios/api.github.com/project-cards/raw-fixture.json index e5af4c62..8b527bef 100644 --- a/scenarios/api.github.com/project-cards/raw-fixture.json +++ b/scenarios/api.github.com/project-cards/raw-fixture.json @@ -3,13 +3,13 @@ "scope": "https://api.github.com:443", "method": "post", "path": "/orgs/octokit-fixture-org/repos", - "body": { "name": "tmp-scenario-prooject-cards-20220719043919621-jyt6q" }, + "body": { "name": "tmp-scenario-project-cards-20220719043919621-jyt6q" }, "status": 201, "response": { "id": 515436055, "node_id": "R_kgDOHrjuFw", - "name": "tmp-scenario-prooject-cards-20220719043919621-jyt6q", - "full_name": "octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "name": "tmp-scenario-project-cards-20220719043919621-jyt6q", + "full_name": "octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "private": false, "owner": { "login": "octokit-fixture-org", @@ -31,53 +31,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "html_url": "https://github.com/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "description": null, "fork": false, - "url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", - "forks_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/forks", - "keys_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/teams", - "hooks_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/hooks", - "issue_events_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/issues/events{/number}", - "events_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/events", - "assignees_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/assignees{/user}", - "branches_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/branches{/branch}", - "tags_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/tags", - "blobs_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/statuses/{sha}", - "languages_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/languages", - "stargazers_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/stargazers", - "contributors_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/contributors", - "subscribers_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/subscribers", - "subscription_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/subscription", - "commits_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/contents/{+path}", - "compare_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/merges", - "archive_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/downloads", - "issues_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/issues{/number}", - "pulls_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/pulls{/number}", - "milestones_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/milestones{/number}", - "notifications_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/labels{/name}", - "releases_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/releases{/id}", - "deployments_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/deployments", + "url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", + "forks_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/forks", + "keys_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/teams", + "hooks_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/hooks", + "issue_events_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/issues/events{/number}", + "events_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/events", + "assignees_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/assignees{/user}", + "branches_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/branches{/branch}", + "tags_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/tags", + "blobs_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/languages", + "stargazers_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/stargazers", + "contributors_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/contributors", + "subscribers_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/subscribers", + "subscription_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/subscription", + "commits_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/contents/{+path}", + "compare_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/merges", + "archive_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/downloads", + "issues_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/issues{/number}", + "pulls_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/labels{/name}", + "releases_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/releases{/id}", + "deployments_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/deployments", "created_at": "2022-07-19T04:39:19Z", "updated_at": "2022-07-19T04:39:19Z", "pushed_at": "2022-07-19T04:39:20Z", - "git_url": "git://github.com/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q.git", - "ssh_url": "git@github.com:octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q.git", - "clone_url": "https://github.com/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q.git", - "svn_url": "https://github.com/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "git_url": "git://github.com/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q.git", + "ssh_url": "git@github.com:octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q.git", + "clone_url": "https://github.com/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q.git", + "svn_url": "https://github.com/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "homepage": null, "size": 0, "stargazers_count": 0, @@ -160,7 +160,7 @@ "X-Accepted-OAuth-Scopes", "public_repo, repo", "Location", - "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "X-GitHub-Media-Type", "github.v3; format=json", "X-RateLimit-Limit", @@ -209,13 +209,13 @@ { "scope": "https://api.github.com:443", "method": "post", - "path": "/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/projects", + "path": "/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/projects", "body": { "name": "Example project" }, "status": 201, "response": { - "owner_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "owner_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "url": "https://api.github.com/projects/14592722", - "html_url": "https://github.com/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q/projects/1", + "html_url": "https://github.com/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q/projects/1", "columns_url": "https://api.github.com/projects/14592722/columns", "id": 14592722, "node_id": "PRO_kwLOHrjuF84A3qrS", @@ -1280,7 +1280,7 @@ { "scope": "https://api.github.com:443", "method": "delete", - "path": "/repos/octokit-fixture-org/tmp-scenario-prooject-cards-20220719043919621-jyt6q", + "path": "/repos/octokit-fixture-org/tmp-scenario-project-cards-20220719043919621-jyt6q", "body": "", "status": 204, "response": "", diff --git a/scenarios/api.github.com/project-cards/record.js b/scenarios/api.github.com/project-cards/record.js index 484b81f2..89b175f6 100644 --- a/scenarios/api.github.com/project-cards/record.js +++ b/scenarios/api.github.com/project-cards/record.js @@ -9,7 +9,7 @@ async function lockIssue(state) { request: state.request, token: env.FIXTURES_USER_A_TOKEN_FULL_ACCESS, org: "octokit-fixture-org", - name: "prooject-cards", + name: "project-cards", }); await temporaryRepository.create(); diff --git a/scenarios/api.github.com/search-issues/record.js b/scenarios/api.github.com/search-issues/record.js index 1780949f..86eb5b7f 100644 --- a/scenarios/api.github.com/search-issues/record.js +++ b/scenarios/api.github.com/search-issues/record.js @@ -17,7 +17,7 @@ async function searchIssues(state) { try { // https://developer.github.com/v3/issues/#create-an-issue - // (theses requests get ignored, we need an existing issues for the serarch) + // (theses requests get ignored, we need an existing issues for the search) await state.request({ method: "post", url: `/repos/octokit-fixture-org/${temporaryRepository.name}/issues`, diff --git a/test/integration/normalize.test.js b/test/integration/normalize.test.js index 0e325a60..9d273b73 100644 --- a/test/integration/normalize.test.js +++ b/test/integration/normalize.test.js @@ -5,13 +5,13 @@ import normalize from "../../lib/normalize/index.js"; globSync("scenarios/**/raw-fixture.json") .map((path) => path.replace(/(^scenarios\/|\/raw-fixture.json$)/g, "")) - .forEach((fixturnName) => { - test(`normalize ${fixturnName}`, async () => { + .forEach((fixtureName) => { + test(`normalize ${fixtureName}`, async () => { const raw = JSON.parse( - readFileSync(`./scenarios/${fixturnName}/raw-fixture.json`), + readFileSync(`./scenarios/${fixtureName}/raw-fixture.json`), ); const expected = JSON.parse( - readFileSync(`./scenarios/${fixturnName}/normalized-fixture.json`), + readFileSync(`./scenarios/${fixtureName}/normalized-fixture.json`), ); const scenarioState = { diff --git a/test/integration/smoke.test.js b/test/integration/smoke.test.js index e85de953..62d3ca2f 100644 --- a/test/integration/smoke.test.js +++ b/test/integration/smoke.test.js @@ -38,7 +38,7 @@ test("Missing Accept header", async () => { } }); -test("Matches corret fixture based on authorization header", async () => { +test("Matches correct fixture based on authorization header", async () => { fixtures.mock("api.github.com/get-root"); const result = await axios({ diff --git a/test/unit/set-if-exists.test.js b/test/unit/set-if-exists.test.js index f5c02ff8..5d21b229 100644 --- a/test/unit/set-if-exists.test.js +++ b/test/unit/set-if-exists.test.js @@ -5,7 +5,7 @@ test("setIfExists accepts undefined as object argument", () => { expect(result).toBe(undefined); }); -test("setIfExists sets nested valuest", () => { +test("setIfExists sets nested values", () => { const object = { foo: { bar: "baz",