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

DurationFormat Coverage #3592

Merged

Conversation

romulocintra
Copy link
Member

@romulocintra romulocintra commented Jun 29, 2022

Update Coverage Intl.DurationFormat #3305

@romulocintra romulocintra changed the title Update duration format coverage methods DurationFormat Coverage Jun 29, 2022
@romulocintra romulocintra marked this pull request as ready for review June 29, 2022 16:31
@romulocintra romulocintra requested review from ryzokuken and Ms2ger June 29, 2022 16:31
Ms2ger
Ms2ger previously approved these changes Jun 30, 2022

assert.sameValue(typeof format, "function");

assert.throws(TypeError, () => format.call(undefined), "undefined");
Copy link
Contributor

Choose a reason for hiding this comment

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

These are gonna throw anyway even if there's no brand check, because you're not passing a valid object as the duration argument. Compare 9762bc9.


assert.sameValue(typeof formatToParts, "function");

assert.throws(TypeError, () => formatToParts.call(undefined), "undefined");
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as with format

@romulocintra romulocintra requested a review from Ms2ger June 30, 2022 09:51
@Ms2ger Ms2ger merged commit 6432c9d into tc39:main Jul 13, 2022
@iamstolis
Copy link
Contributor

Tests intl402/DurationFormat/prototype/format/invalid-arguments-throws.js and intl402/DurationFormat/prototype/formatToParts/invalid-arguments-throws.js added by this PR miss features: [Intl.DurationFormat].

@romulocintra
Copy link
Member Author

Tests intl402/DurationFormat/prototype/format/invalid-arguments-throws.js and intl402/DurationFormat/prototype/formatToParts/invalid-arguments-throws.js added by this PR miss features: [Intl.DurationFormat].

Thank you for catching this one @iamstolis - fixed in #3605

@iamstolis
Copy link
Contributor

@romulocintra, thank you for an extremely fast fix!

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.

3 participants