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

test: ensure our enums are types and values #3146

Merged
merged 3 commits into from
Feb 18, 2022
Merged

test: ensure our enums are types and values #3146

merged 3 commits into from
Feb 18, 2022

Conversation

nbbeeken
Copy link
Contributor

Description

What is changing?

I've added tests that make sure the type annotation and enum values are equal.

Inspired by a conversation on #3131

What is the motivation for this change?

By using Object.values(x) are type tests will ensure that we continue to export an actual runtime value.
And then also the expectType assertion checks to make sure that X is a typescript type.
This will prevent any regression around our choice of doing manual type augmentation for Enums.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

durran
durran previously approved these changes Feb 15, 2022
@dariakp dariakp added Blocked Blocked on other work Team Review Needs review from team and removed Blocked Blocked on other work labels Feb 16, 2022
durran
durran previously approved these changes Feb 18, 2022
dariakp
dariakp previously approved these changes Feb 18, 2022
baileympearson
baileympearson previously approved these changes Feb 18, 2022
@dariakp dariakp merged commit b0d4413 into main Feb 18, 2022
@dariakp dariakp deleted the test/enum-types branch February 18, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants