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

Refactorization of the 2 digits date part code in audit component tests #6940

Merged
merged 2 commits into from
Jan 4, 2018

Conversation

fgd99
Copy link
Contributor

@fgd99 fgd99 commented Jan 3, 2018

Fix #6926

just a little refactorization to remove the duplicate code that builds 2 digits date parts in the function getDate of the audits component tests

@@ -25,6 +25,10 @@ import { AuditsComponent } from '../../../../../../main/webapp/app/admin/audits/
import { AuditsService } from '../../../../../../main/webapp/app/admin/audits/audits.service';
import { ITEMS_PER_PAGE } from '../../../../../../main/webapp/app/shared';

function build2DigitsDatePart(datePart: number) {
return ('0' + datePart).slice(-2);
Copy link
Member

Choose a reason for hiding this comment

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

Please replace by

return `0${datePart}`.slice(-2);

@deepu105 deepu105 merged commit b6f7897 into jhipster:master Jan 4, 2018
@jdubois jdubois added this to the 4.13.3 milestone Jan 9, 2018
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.

4 participants