Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chenasraf committed Jul 18, 2021
1 parent ac66f5e commit 7a7789b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import massarg from "../src"
describe("print help", () => {
test("should print help without command options", () => {
const helpStr = massarg()
.help({ useColors: false })
.help({ binName: "test", useColors: false })
.option({
name: "number",
description: "Number value",
Expand All @@ -13,7 +13,7 @@ describe("print help", () => {
.join("\n")

expect(helpStr).toBe(
"Usage: processChild.js [command] [options]" +
"Usage: test [command] [options]" +
"\n\n" +
"Options:" +
"\n\n" +
Expand All @@ -25,7 +25,7 @@ describe("print help", () => {
})
test("should print help correctly with only global options", () => {
const helpStr = massarg()
.help({ useColors: false })
.help({ binName: "test", useColors: false })
.command({
name: "cmd",
description: "Command",
Expand All @@ -40,7 +40,7 @@ describe("print help", () => {
.join("\n")

expect(helpStr).toBe(
"Usage: processChild.js [command] [options]" +
"Usage: test [command] [options]" +
"\n\n" +
"Commands:" +
"\n\n" +
Expand All @@ -57,7 +57,7 @@ describe("print help", () => {

test("should print help correctly with command options", () => {
const helpStr = massarg()
.help({ useColors: false })
.help({ binName: "test", useColors: false })
.command({
name: "cmd",
description: "Command",
Expand All @@ -73,7 +73,7 @@ describe("print help", () => {
.join("\n")

expect(helpStr).toBe(
"Usage: processChild.js [command] [options]" +
"Usage: test [command] [options]" +
"\n\n" +
"Commands:" +
"\n\n" +
Expand Down

0 comments on commit 7a7789b

Please sign in to comment.