Skip to content

Commit

Permalink
improved usage docs and removed extra cmd in shell choices
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Jul 22, 2024
1 parent 04ab6ae commit abfebea
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cli/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ const shell = require('../lib/shell.js');
class LeiaCommand extends Command {
static id = 'leia';
static description = 'Cleverly converts markdown files into mocha cli tests';
static usage = '<files> <patterns> [options]';
static usage = `<files> <patterns> \
[--cleanup-header=<cleanup-headers>] \
[--debug] \
[--help] \
[--ignore=<patterns>] \
[--retry=<count>] \
[--setup-header=<setup-headers>] \
[--test-header=<test-headers>] \
[--shell=<bash|cmd|powershell|pwsh|sh|zsh>] \
[--stdin] \
[--version]`;
static strict = false;
static examples = [
'leia README.md',
Expand Down Expand Up @@ -59,7 +69,7 @@ class LeiaCommand extends Command {
'shell': flags.string({
default: shell().binary,
description: 'the shell to use for the tests, default is autodetected',
options: ['bash', 'cmd', 'powershell', 'pwsh', 'sh', 'zsh', 'cmd'],
options: ['bash', 'cmd', 'powershell', 'pwsh', 'sh', 'zsh'],
}),
'stdin': flags.boolean({
description: 'attach stdin when the test is run',
Expand Down Expand Up @@ -108,6 +118,7 @@ class LeiaCommand extends Command {
.fromPairs()
.value();


// make sure we split any headers that need to be split
['setupHeader', 'testHeader', 'cleanupHeader'].forEach((header) => {
if (options[header].length === 1) options[header] = options[header][0].split(',');
Expand Down

0 comments on commit abfebea

Please sign in to comment.