From 7ab9847ee33350709e70facf5465fcd6c90c63d9 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Thu, 15 Aug 2024 20:12:59 -0700 Subject: [PATCH] fixes test --- test/api/openSaucedApi.test.ts | 6 +++--- test/utils/urlMatcher.test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/api/openSaucedApi.test.ts b/test/api/openSaucedApi.test.ts index 5709f537..f5ccdd9f 100644 --- a/test/api/openSaucedApi.test.ts +++ b/test/api/openSaucedApi.test.ts @@ -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 not return a 200 error for a user that does not exist", async () => { + const response = await fetch(`${OPEN_SAUCED_USERS_ENDPOINT}/foolala`); + expect(response.status).not.toBe(200); }) }) diff --git a/test/utils/urlMatcher.test.ts b/test/utils/urlMatcher.test.ts index 06076875..966de389 100644 --- a/test/utils/urlMatcher.test.ts +++ b/test/utils/urlMatcher.test.ts @@ -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')