Skip to content

Commit

Permalink
Corrected --comment/--comments spelling (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg authored May 9, 2020
1 parent b189ab7 commit e812c84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/comments/convertComments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const createStubDependencies = (
});

describe("convertComments", () => {
it("returns an empty result when --comment is not provided", async () => {
it("returns an empty result when --comments is not provided", async () => {
// Arrange
const dependencies = createStubDependencies();

Expand All @@ -24,7 +24,7 @@ describe("convertComments", () => {
});
});

it("returns an error when --comment is given as a boolean value", async () => {
it("returns an error when --comments is given as a boolean value", async () => {
// Arrange
const dependencies = createStubDependencies();

Expand Down
2 changes: 1 addition & 1 deletion src/comments/convertComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type ConvertCommentsDependencies = {
};

const noGlobsResult: ResultWithDataStatus<string[]> = {
errors: [new Error("--comment requires file path globs to be passed.")],
errors: [new Error("--comments requires file path globs to be passed.")],
status: ResultStatus.Failed,
};

Expand Down
10 changes: 5 additions & 5 deletions src/reporting/reportCommentResults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stdout.write,
`♻ Consider using --comment to replace TSLint comment directives in your source files. ♻`,
`♻ Consider using --comments to replace TSLint comment directives in your source files. ♻`,
);
});

Expand All @@ -28,12 +28,12 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stderr.write,
`❌ 1 error converting TSLint comment directives in --comment files. ❌`,
`❌ 1 error converting TSLint comment directives in --comments files. ❌`,
` Check ${logger.debugFileName} for details.`,
);
expectEqualWrites(
logger.info.write,
`1 error converting TSLint comment directives in --comment files:`,
`1 error converting TSLint comment directives in --comments files:`,
` * Hello`,
);
});
Expand All @@ -49,12 +49,12 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stderr.write,
`❌ 2 errors converting TSLint comment directives in --comment files. ❌`,
`❌ 2 errors converting TSLint comment directives in --comments files. ❌`,
` Check ${logger.debugFileName} for details.`,
);
expectEqualWrites(
logger.info.write,
`2 errors converting TSLint comment directives in --comment files:`,
`2 errors converting TSLint comment directives in --comments files:`,
` * Hello`,
` * World`,
);
Expand Down
4 changes: 2 additions & 2 deletions src/reporting/reportCommentResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const reportCommentResults = (
if (commentsResult.status === ResultStatus.Failed) {
const headline = `${commentsResult.errors.length} error${
commentsResult.errors.length === 1 ? "" : "s"
} converting TSLint comment directives in --comment files`;
} converting TSLint comment directives in --comments files`;

dependencies.logger.stderr.write(chalk.magentaBright(`${EOL}${headline}. ❌${EOL}`));
dependencies.logger.stderr.write(
Expand All @@ -33,7 +33,7 @@ export const reportCommentResults = (
if (commentsResult.data === undefined) {
dependencies.logger.stdout.write(
chalk.magentaBright(
`${EOL}♻ Consider using --comment to replace TSLint comment directives in your source files. ♻${EOL}`,
`${EOL}♻ Consider using --comments to replace TSLint comment directives in your source files. ♻${EOL}`,
),
);
return;
Expand Down

0 comments on commit e812c84

Please sign in to comment.