Skip to content
Merged
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
4 changes: 4 additions & 0 deletions src/test/unit/profiler-edit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ describe('makeOptionsFromArgv', function () {
});

it('throws when -i has no value because next token is a flag', function () {
// Commander writes "error: too many arguments" to stderr before throwing
// (it takes `-o` as the value of `-i` and then sees the output path as an
// unexpected positional). Silence it so it doesn't clutter test output.
jest.spyOn(process.stderr, 'write').mockImplementation(() => true);
expect(() =>
makeOptionsFromArgv([...commonArgs, '-i', '-o', '/path/to/output.json'])
).toThrow();
Expand Down
Loading