feat(medusa): Add file size calculation for product export (#1726)
This commit is contained in:
committed by
GitHub
parent
c6dc9086cf
commit
fb7abbf407
@@ -133,6 +133,9 @@ describe("Batch job of product-export type", () => {
|
||||
|
||||
expect(isFileExists).toBeTruthy()
|
||||
|
||||
const fileSize = (await fs.stat(exportFilePath)).size
|
||||
expect(batchJob.result?.file_size).toBe(fileSize)
|
||||
|
||||
const data = (await fs.readFile(exportFilePath)).toString()
|
||||
const [, ...lines] = data.split("\r\n").filter(l => l)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user