Skip to content

Conversation

claudia1296
Copy link
Contributor

@claudia1296 claudia1296 commented Jan 7, 2025

fix: fix date test and typo

  • Closes FLUI-146

Description

Acceptance Criterias

Links

Extra Validation

  • Reviewer video or screenshots attached
  • QA Done
  • Design/UI Approved from design

Screenshot or Video

Before

After

QA

Steps to validate

Mention

Copy link

github-actions bot commented Jan 7, 2025

Coverage report for packages/ui

St.
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

0 tests passing in 0 suite.

Report generated by 🧪jest coverage report action from 4290432

Copy link

github-actions bot commented Jan 7, 2025

Project Coverage and Test

Statements : 34.29% ( 10633/31005 )
Branches : 55.06% ( 620/1126 )
Functions : 32.34% ( 197/609 )
Lines : 34.29% ( 10633/31005 )

Test Suites: 58 passed, 58 total
Tests: 262 passed, 262 total
Snapshots: 0 total
Time: 91.087 s
Ran all test suites.

@claudia1296 claudia1296 requested a review from meek0 January 7, 2025 16:58
const startYear = new Date(today.getFullYear(), 0, 1);
const endPeriodTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 2);

const randomDate = new Date(
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi avoir une date random et non fixe ?
Il me semble qu'il est préférable d'avoir des tests prédictibles pour les tests.

expect(getRelativeDate(yesterday, format)).toEqual('yesteday');
expect(getRelativeDate(yesterday, format)).toEqual('yesterday');
});
test('should return this years date', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

should return this year date non ?

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants