Skip to content

test: Refactor tests for ProjectV2Item.UnmarshalJSON#4323

Merged
gmlewis merged 2 commits into
google:masterfrom
alexandear-org:test/projects-marshal
Jun 23, 2026
Merged

test: Refactor tests for ProjectV2Item.UnmarshalJSON#4323
gmlewis merged 2 commits into
google:masterfrom
alexandear-org:test/projects-marshal

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

Refactor tests to use the testJSONUnmarshalOnly helper.

@alexandear

Copy link
Copy Markdown
Contributor Author

This is an example of how we write Marshal tests. See https://github.com/google/go-github/pull/4319/changes#r3453845619

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like tests are failing.

@alexandear alexandear requested a review from gmlewis June 23, 2026 16:24
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.48%. Comparing base (728cdb1) to head (5002e2e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4323   +/-   ##
=======================================
  Coverage   97.48%   97.48%           
=======================================
  Files         193      193           
  Lines       19400    19400           
=======================================
  Hits        18912    18912           
  Misses        270      270           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @alexandear!
LGTM.
Merging.

Comment thread github/projects_test.go
Body: Ptr("Draft issue body content"),
},
},
CreatedAt: &Timestamp{time.Date(2023, 1, 3, 0, 0, 0, 0, time.UTC)},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Originally, we had referenceTime and referenceTimeStr in this repo so we wouldn't have to keep creating new time.Date and arbitrary strings throughout this repo, but I see that I've never really enforced this, so maybe I'll just create a new issue to clean this all up, and take care of all of them in a single PR after this gets merged.

@gmlewis gmlewis merged commit 2801b4b into google:master Jun 23, 2026
15 checks passed
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.

2 participants