Skip to content

Commit

Permalink
[#1208] fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
4upz committed Nov 2, 2023
1 parent 34bbb79 commit 41cab62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/cli/src/__tests__/csv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ describe('csv test', () => {
end,
]

const compatibleFormattedTime = process.platform === 'win32' ? '_204131' : '-20:41:41'
const outputFilePath = path.join(process.cwd(), `results-2020-08-05${compatibleFormattedTime}.csv`)
const compatibleFormattedTime =
process.platform === 'win32' ? '_204131' : '-20:41:41'
const outputFilePath = path.join(
process.cwd(),
`results-2020-08-05${compatibleFormattedTime}.csv`,
)

beforeEach(() => {
jest.spyOn(Date, 'now').mockImplementation(() => 1596660091000)
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default async function cli(argv: string[] = process.argv) {
}

if (format === 'csv') {
const compatibleDateTimeFormat = process.platform === 'win32' ? 'YYYY-MM-DD_HHmmss' : 'YYYY-MM-DD-HH:mm:ss'
const compatibleDateTimeFormat =
process.platform === 'win32' ? 'YYYY-MM-DD_HHmmss' : 'YYYY-MM-DD-HH:mm:ss'
const filePath = path.join(
process.cwd(),
`results-${moment().utc().format(compatibleDateTimeFormat)}.csv`,
Expand Down

0 comments on commit 41cab62

Please sign in to comment.