-
Notifications
You must be signed in to change notification settings - Fork 54
NEW @W-17977844@ rules command can output csv files #1877
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
Conversation
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.ts] |
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.
Noticing that some of the files created by people other than me are space-indented, so I'm adding a thing to the .editorconfig to hopefully keep it all consistent in the future.
| it.each([ | ||
| {ext: 'json', format: OutputFormat.JSON}, | ||
| {ext: 'csv', format: OutputFormat.CSV} | ||
| ])('Writes to a $ext file path', ({ext, format}) => { | ||
| const outfilePath = path.join('the', 'results', 'path', `file.${ext}`); | ||
| const expectations = { | ||
| file: outfilePath, | ||
| contents: `Rules formatted as ${format}` | ||
| }; | ||
| const rulesWriter = new RulesFileWriter(expectations.file); | ||
| const stubbedSelection = new Stub.StubEmptyRuleSelection(); | ||
| rulesWriter.write(stubbedSelection); | ||
|
|
||
| expect(writeFileSpy).toHaveBeenCalled(); | ||
| expect(writeFileInvocations).toEqual([expectations]); | ||
| }); | ||
| }); | ||
| expect(writeFileSpy).toHaveBeenCalled(); | ||
| expect(writeFileInvocations).toEqual([expectations]); | ||
| }); |
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.
I changed this test to use it.each(), and that's the only functional change. Everything else was just whitespace to make it tab-indented.
stephen-carter-at-sf
left a comment
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.
Don't we need to update the rules command so that the output-format has multiple: true so we can supply multiple?
jshackell-sfdc
left a comment
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.
lgtm
No description provided.