Skip to content

Commit

Permalink
Change initial variable values in test for better error messages
Browse files Browse the repository at this point in the history
(cherry picked from commit 87db4ba)
  • Loading branch information
aweebit authored and abetomo committed Aug 19, 2023
1 parent 14fb529 commit 401b0d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/command.addHelpText.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('context checks with full parse', () => {
});

test('when help requested then context.error is false', () => {
let context = {};
let context;
const program = new commander.Command();
program
.exitOverride()
Expand All @@ -193,7 +193,7 @@ describe('context checks with full parse', () => {
});

test('when help for error then context.error is true', () => {
let context = {};
let context;
const program = new commander.Command();
program
.exitOverride()
Expand All @@ -206,7 +206,7 @@ describe('context checks with full parse', () => {
});

test('when help on program then context.command is program', () => {
let context = {};
let context;
const program = new commander.Command();
program
.exitOverride()
Expand All @@ -218,7 +218,7 @@ describe('context checks with full parse', () => {
});

test('when help on subcommand and "before" subcommand then context.command is subcommand', () => {
let context = {};
let context;
const program = new commander.Command();
program
.exitOverride();
Expand All @@ -231,7 +231,7 @@ describe('context checks with full parse', () => {
});

test('when help on subcommand and "beforeAll" on program then context.command is subcommand', () => {
let context = {};
let context;
const program = new commander.Command();
program
.exitOverride()
Expand Down

0 comments on commit 401b0d6

Please sign in to comment.