Skip to content

Commit 83c2415

Browse files
fix: test driftage (#311)
* fixes test * Update openSaucedApi.test.ts Co-authored-by: Nick Taylor <[email protected]> * remove extra } --------- Co-authored-by: Nick Taylor <[email protected]>
1 parent d93d873 commit 83c2415

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/api/openSaucedApi.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ describe("openSaucedUserEndpoint", () => {
1414
expect(data.login).toBe("bdougie");
1515
})
1616

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

test/utils/urlMatcher.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ test('getPullRequestAPIURL', async () => {
9898
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/pull/164')).toBe('https://api.github.com/repos/open-sauced/ai/pulls/164')
9999
expect(await getPullRequestAPIURL('https://github.com/open-sauced/ai/pull/163')).toBe('https://api.github.com/repos/open-sauced/ai/pulls/163')
100100
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')
101-
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/master...some-branch')
101+
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/next...some-branch')
102102
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')
103103
expect(await getPullRequestAPIURL('https://github.com/tailwindlabs/tailwindcss/compare/master...some-branch')).toBe('https://api.github.com/repos/tailwindlabs/tailwindcss/compare/master...some-branch')
104104

0 commit comments

Comments
 (0)