Skip to content

ref(tsc): usageChart utils to tsx #52935

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

Merged
merged 1 commit into from
Jul 17, 2023
Merged

ref(tsc): usageChart utils to tsx #52935

merged 1 commit into from
Jul 17, 2023

Conversation

IanWoodard
Copy link
Member

Convert utils.spec.jsx to tsx

@IanWoodard IanWoodard requested a review from a team as a code owner July 15, 2023 00:09
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 15, 2023
@@ -13,7 +13,7 @@ describe('getDateFromMoment', () => {
// Ensure date remains in UTC
it('shows the date if interval is >= 24h', () => {
expect(getDateFromMoment(start)).toBe('Jul 9');
expect(getDateFromMoment(start, '7d')).toBe('Jul 9');
expect(getDateFromMoment(start, '2d')).toBe('Jul 9');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
expect(getDateFromMoment(start, '2d')).toBe('Jul 9');
expect(getDateFromMoment(start, '7d')).toBe('Jul 9');

this should be kept the same, right?

Copy link
Member Author

@IanWoodard IanWoodard Jul 17, 2023

Choose a reason for hiding this comment

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

I changed it since 7d is not a valid IntervalPeriod.

Copy link
Contributor

Choose a reason for hiding this comment

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

do you mean 2d is not valid? It's 7d after your change

Copy link
Member Author

Choose a reason for hiding this comment

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

That is Cathy's suggested change. I changed it from 7d to 2d.

Copy link
Contributor

Choose a reason for hiding this comment

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

mb 👍

Copy link
Member

Choose a reason for hiding this comment

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

oh i see there's an IntervalPeriod object

@IanWoodard IanWoodard requested a review from cathteng July 17, 2023 17:41
@@ -13,7 +13,7 @@ describe('getDateFromMoment', () => {
// Ensure date remains in UTC
it('shows the date if interval is >= 24h', () => {
expect(getDateFromMoment(start)).toBe('Jul 9');
expect(getDateFromMoment(start, '7d')).toBe('Jul 9');
expect(getDateFromMoment(start, '2d')).toBe('Jul 9');
Copy link
Member

Choose a reason for hiding this comment

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

oh i see there's an IntervalPeriod object

@IanWoodard IanWoodard merged commit 08c8342 into master Jul 17, 2023
@IanWoodard IanWoodard deleted the iw/jsx-tests branch July 17, 2023 19:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants