Skip to content

Commit

Permalink
fixed cli tests when running in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
eahefnawy committed Feb 5, 2019
1 parent 4a64f4a commit c551abf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/classes/CLI.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ describe('CLI', () => {

it('should return true when the "--help" parameter is given', () => {
cli = new CLI(serverless, ['--help']);
serverless.cli = cli;

class PluginMock {
constructor() {
Expand Down Expand Up @@ -221,6 +222,7 @@ describe('CLI', () => {

it('should return true when the "-h" parameter is given', () => {
cli = new CLI(serverless, ['-h']);

const processedInput = cli.processInput();

const helpDisplayed = cli.displayHelp(processedInput);
Expand Down Expand Up @@ -254,6 +256,7 @@ describe('CLI', () => {

it('should return true when the "-h" parameter is given with a command', () => {
cli = new CLI(serverless, ['test', '-h']);
serverless.cli = cli;
class PluginMock {
constructor() {
this.commands = {
Expand Down Expand Up @@ -287,6 +290,7 @@ describe('CLI', () => {

it('should return true when the "-h" parameter is given with a deep command', () => {
cli = new CLI(serverless, ['test', 'test', '-h']);
serverless.cli = cli;
class PluginMock {
constructor() {
this.commands = {
Expand Down Expand Up @@ -336,6 +340,7 @@ describe('CLI', () => {

it('should return false if no "help" or "version" related command / option is given', () => {
cli = new CLI(serverless, ['test']);
serverless.cli = cli;
class PluginMock {
constructor() {
this.commands = {
Expand Down

0 comments on commit c551abf

Please sign in to comment.