-
Notifications
You must be signed in to change notification settings - Fork 93
fix: add preferred number of levels option #424
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,11 @@ describe("argumentsToString", () => { | |
| expect( | ||
| argumentsToString({ | ||
| twoLevel: true, | ||
| preferredNumberOfLevels: 2, | ||
| numTrials: 5, | ||
| output: ["tree", "clu"], | ||
| help: "advanced" | ||
| }) | ||
| ).toBe(" -o tree,clu --two-level --num-trials 5 -hh"); | ||
| ).toBe(" -o tree,clu --two-level --preferred-number-of-levels 2 --num-trials 5 -hh"); | ||
| }); | ||
|
Comment on lines
6
to
15
|
||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JS wrapper currently serializes
twoLeveltogether withpreferredNumberOfLevels, but the native CLI rejects this combination. Since the PR description says public wrappers should reject the invalid combination, consider adding a check in argumentsToString (or earlier in createWorker) that throws a clear error when both are provided, instead of letting the worker fail at runtime.