Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --bench option and update snapshot #170

Merged
merged 2 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion __snapshots__/writeConfigFile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ snapshot[`writeConfigFile 3`] = `
' // "include": [] /* List of files or directories that will be searched for tests. */',
' // "exclude": [] /* List of files or directories that will not be searched for tests. */',
" }",
" }",
" },",
' "bench": {',
' "files": {',
' // "include": [] /* List of files or directories that will be searched for benchmarks. */',
' // "exclude": [] /* List of files or directories that will not be searched for benchmarks. */',
" }",
" },",
' // "lock": "true" /* Whether to use a lock file or the path to use for the lock file. Can be overridden by CLI arguments. */',
"}",
]
`;
Expand Down Expand Up @@ -195,3 +202,16 @@ snapshot[`writeConfigFile 10`] = `
"}",
]
`;

snapshot[`writeConfigFile 11`] = `
[
"{",
' "bench": {',
' "files": {',
' "include": [],',
' "exclude": []',
" }",
" }",
"}",
]
`;
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { Command } from "https://deno.land/x/cliffy@v0.25.4/command/mod.ts";
export {
default as schema,
} from "https://deno.land/x/deno@v1.28.2/cli/schemas/config-file.v1.json" assert {
} from "https://deno.land/x/deno@v1.29.0/cli/schemas/config-file.v1.json" assert {
type: "json",
};
4 changes: 4 additions & 0 deletions init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ await new Command()
"-a, --fill [fill:boolean]",
"Create the config file as .jsonc with the possible options listed as comments.",
)
.option(
"-b, --bench [bench:boolean]",
"Set up config for deno bench only. Requires Deno 1.29 or higher",
)
.option(
"-c, --jsonc [jsonc:boolean]",
"Create the config file as .jsonc. Alias for --fill.",
Expand Down
Loading