Skip to content

Commit

Permalink
fix: rename practice and files. Add name and suggestion text.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Dec 8, 2019
1 parent ba705b4 commit 9e18b76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { createTestContainer, TestContainerContext } from '../../inversify.confi
import { PracticeEvaluationResult } from '../../model';
import { BitbucketPullRequestState } from '../../services';
import { BitbucketNock } from '../../test/helpers/bitbucketNock';
import { TimeToSolvePractice } from './TimeToSolvePractice';
import { TimeToSolvePullRequestsPractice } from './TimeToSolvePullRequestsPractice';

describe('TimeToSolvePractice', () => {
let practice: TimeToSolvePractice;
describe('TimeToSolvePullRequestsPractice', () => {
let practice: TimeToSolvePullRequestsPractice;
let containerCtx: TestContainerContext;
let bitbucketNock: BitbucketNock;
const MockedCollaborationInspector = <jest.Mock<CollaborationInspector>>(<unknown>CollaborationInspector);
Expand All @@ -22,7 +22,7 @@ describe('TimeToSolvePractice', () => {
beforeAll(() => {
const args = { uri: 'https://bitbucket.org/pypy/pypy' };
containerCtx = createTestContainer(args);
containerCtx.container.bind('TimeToSolvePractice').to(TimeToSolvePractice);
containerCtx.container.bind('TimeToSolvePractice').to(TimeToSolvePullRequestsPractice);
practice = containerCtx.container.get('TimeToSolvePractice');
mockCollaborationInspector = new MockedCollaborationInspector();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { DxPractice } from '../DxPracticeDecorator';
import { IPractice } from '../IPractice';

@DxPractice({
id: 'LanguageIndependent.TimeToSolve',
name: '',
id: 'LanguageIndependent.TimeToSolvePullRequests',
name: 'Solve Pull Requests Continuously',
impact: PracticeImpact.medium,
suggestion: '',
suggestion: 'Do not have an open Pull Request more than 30 days. Review PRs continuously.',
reportOnlyOnce: true,
url: 'https://dxkb.io/p/pull-requests',
dependsOn: { practicing: ['LanguageIndependent.DoesPullRequests'] },
})
export class TimeToSolvePractice implements IPractice {
export class TimeToSolvePullRequestsPractice implements IPractice {
async isApplicable(): Promise<boolean> {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/practices/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { TsGitignoreCorrectlySetPractice } from './TypeScript/TsGitignoreCorrect
import { DoesPullRequestsPractice } from './LanguageIndependent/DoesPullRequests';
import { DependenciesVersionMinorPatchLevel } from './JavaScript/DependenciesVersionMinorPatchLevel';
import { CorrectCommitMessagesPractice } from './LanguageIndependent/CorrectCommitMessagesPractice';
import { TimeToSolvePractice } from './LanguageIndependent/TimeToSolvePractice';
import { TimeToSolvePullRequestsPractice } from './LanguageIndependent/TimeToSolvePractice';

// register practices here
export const practices = [
Expand Down Expand Up @@ -52,5 +52,5 @@ export const practices = [
TsGitignoreCorrectlySetPractice,
DoesPullRequestsPractice,
CorrectCommitMessagesPractice,
TimeToSolvePractice,
TimeToSolvePullRequestsPractice,
];

0 comments on commit 9e18b76

Please sign in to comment.