feat: support pass all args syntax

This commit is contained in:
Simon Lecoq
2023-11-08 05:51:34 +00:00
committed by GitHub
parent 5a5795cfe2
commit 01d2a38824
3 changed files with 23 additions and 0 deletions

View File

@@ -57,6 +57,20 @@ Deno.test("deno task make: missing args required throw", async () => {
.rejectedWith(Error, /missing argument/i)
})
Deno.test("deno task make: pass all arguments", async () => {
const stdio = [] as string[]
const { code } = await make({
task: "make:args_pass_all",
argv: ["--foo", "🦕", "🦖"],
config: "tests/deno_make.jsonc",
log: (message) => stdio.push(message),
stdio: "piped",
exit: false,
})
expect(stdio.join("\n")).to.include("--foo").to.include("🦕").and.to.include("🦖")
expect(code).to.equal(0)
})
Deno.test("deno task make: flags", async () => {
const stdio = [] as string[]
const { code } = await make({