Skip to content

Commit

Permalink
Modified tests for commandline input validator
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Apr 20, 2018
1 parent f42d5f7 commit a804714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ describe(CommandLineInputValidator.name, (): void => {
"<ipconfig",
"> ipconfig",
"> ipconfig",
"",
" ",
];

for (const invalidInput of invalidInputs) {
Expand Down
6 changes: 1 addition & 5 deletions src/ts/input-validators/command-line-input-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export class CommandLineInputValidator implements InputValidator {
}

private prefixIsFollowedByCommand(userInput: string): boolean {
if (userInput.length >= 2) {
return userInput[1] !== " ";
} else {
return false;
}
return userInput[1] !== " ";
}
}

0 comments on commit a804714

Please sign in to comment.