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

cli: document that CSV is output to file #8520

Merged
merged 1 commit into from
Apr 22, 2019
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
2 changes: 1 addition & 1 deletion lighthouse-cli/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function getFlags(manualArgv) {
'output': `Reporter for the results, supports multiple values`,
'output-path': `The file path to output the results. Use 'stdout' to write to stdout.
If using JSON output, default is stdout.
If using HTML output, default is a file in the working directory with a name based on the test URL and date.
If using HTML or CSV output, default is a file in the working directory with a name based on the test URL and date.
If using multiple outputs, --output-path is appended with the standard extension for each output type. "reports/my-run" -> "reports/my-run.report.html", "reports/my-run.report.json", etc.
Example: --output-path=./lighthouse-results.html`,
'view': 'Open HTML report in your browser',
Expand Down
7 changes: 7 additions & 0 deletions lighthouse-cli/test/cli/bin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ describe('CLI bin', function() {

expect(getRunLighthouseArgs()[1]).toHaveProperty('outputPath', 'stdout');
});

it('should have no default path when using csv', async () => {
cliFlags = {...cliFlags, output: ['csv']};
await bin.begin();

expect(getRunLighthouseArgs()[1]).toHaveProperty('outputPath', '');
});
});

describe('extraHeaders', () => {
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ Configuration:
--audit-mode, -A Process saved artifacts from disk [boolean]

Output:
--output Reporter for the results, supports multiple values [choices: "csv", "json", "html"] [default: "html"]
--output Reporter for the results, supports multiple values [choices: "json", "html", "csv"] [default: "html"]
--output-path The file path to output the results. Use 'stdout' to write to stdout.
If using JSON or CSV output, default is stdout.
If using HTML output, default is a file in the working directory with a name based on the test URL and date.
If using JSON output, default is stdout.
If using HTML or CSV output, default is a file in the working directory with a name based on the test URL and date.
If using multiple outputs, --output-path is appended with the standard extension for each output type. "reports/my-run" -> "reports/my-run.report.html", "reports/my-run.report.json", etc.
Example: --output-path=./lighthouse-results.html
--view Open HTML report in your browser [boolean]
Expand Down