Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test driftage #311

Merged
merged 3 commits into from
Aug 19, 2024
Merged

fix: test driftage #311

merged 3 commits into from
Aug 19, 2024

Conversation

bdougie
Copy link
Member

@bdougie bdougie commented Aug 16, 2024

Description

Saw test were failing on a benign change on #310. This fixes the user 404 test and Tailwind's default branch change.

Related Tickets & Documents

#310
#309
#308

Mobile & Desktop Screenshots/Recordings

Steps to QA

npm test

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

@bdougie bdougie requested a review from a team August 16, 2024 03:17
Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the tests @bdougie! One small change request.

test/api/openSaucedApi.test.ts Outdated Show resolved Hide resolved
@@ -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')
Copy link
Member

@nickytonline nickytonline Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the failure as it looks like the tailwindlabs/tailwindcss project changed a branch name, but, and not for this PR, but I'd probably mock the network request that gets the default branch name for all these tests, i.e.

const response = await fetch(`https://api.github.com/repos/${username}/${repoName}`);
const { default_branch } = await response.json();

Co-authored-by: Nick Taylor <nick@nickyt.co>
@bdougie bdougie merged commit 83c2415 into beta Aug 19, 2024
8 checks passed
open-sauced bot pushed a commit that referenced this pull request Aug 20, 2024
## [1.16.0-beta.1](v1.15.0...v1.16.0-beta.1) (2024-08-20)

### 🍕 Features

* adds .prettierrc ([#310](#310)) ([c1f0d1e](c1f0d1e))
* Remove PR description generator ([#308](#308)) ([e342847](e342847)), closes [#307](#307)
* Replaces velocity with OSCR ([#309](#309)) ([5a0172d](5a0172d))

### 🐛 Bug Fixes

* Generates a token so the open-sauce bot can push to beta ([#313](#313)) ([985b482](985b482))
* test driftage ([#311](#311)) ([83c2415](83c2415))
open-sauced bot pushed a commit that referenced this pull request Aug 20, 2024
## [1.16.0](v1.15.0...v1.16.0) (2024-08-20)

### 🍕 Features

* adds .prettierrc ([#310](#310)) ([c1f0d1e](c1f0d1e))
* Remove PR description generator ([#308](#308)) ([e342847](e342847)), closes [#307](#307)
* Replaces velocity with OSCR ([#309](#309)) ([5a0172d](5a0172d))

### 🐛 Bug Fixes

* Generates a token so the open-sauce bot can push to beta ([#313](#313)) ([985b482](985b482))
* test driftage ([#311](#311)) ([83c2415](83c2415))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants