Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Add public getters for isPending, isFulfilled and isRejected#207

Open
sja26 wants to merge 1 commit intogoogle:masterfrom
sja26:add-public-getters
Open

Add public getters for isPending, isFulfilled and isRejected#207
sja26 wants to merge 1 commit intogoogle:masterfrom
sja26:add-public-getters

Conversation

@sja26
Copy link

@sja26 sja26 commented Apr 3, 2023

While writing a unit test in my app, I came across the need to assert the state of a promise. Specifically, I want to assert that a promise is pending. Currently, the isPending property has internal access. This pull request simply adds the public modifier to isPending, isFulfilled and isRejected properties of Promise.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant