Skip to content

Commit

Permalink
fix: test driftage (#311)
Browse files Browse the repository at this point in the history
* fixes test

* Update openSaucedApi.test.ts

Co-authored-by: Nick Taylor <nick@nickyt.co>

* remove extra }

---------

Co-authored-by: Nick Taylor <nick@nickyt.co>
  • Loading branch information
bdougie and nickytonline authored Aug 19, 2024
1 parent d93d873 commit 83c2415
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/api/openSaucedApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ describe("openSaucedUserEndpoint", () => {
expect(data.login).toBe("bdougie");
})

it("should return a 404 error for a user that does not exist", async () => {
const response = await fetch(`${OPEN_SAUCED_USERS_ENDPOINT}/1`);
expect(response.status).toBe(404);
it("should return a bad request for a user that does not exist", async () => {
const response = await fetch(`${OPEN_SAUCED_USERS_ENDPOINT}/foolala`);
expect(response.status).toBe(400);
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/utils/urlMatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ test('getPullRequestAPIURL', async () => {
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/pull/164')).toBe('https://api.github.com/repos/open-sauced/ai/pulls/164')
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/pull/163')).toBe('https://api.github.com/repos/open-sauced/ai/pulls/163')
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/compare/some-branch')).toBe('https://api.github.com/repos/open-sauced/ai/compare/beta...some-branch')
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/master...some-branch')
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/next...some-branch')
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/compare/beta...some-branch')).toBe('https://api.github.com/repos/open-sauced/ai/compare/beta...some-branch')
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/master...some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/master...some-branch')

Expand Down

0 comments on commit 83c2415

Please sign in to comment.