Consistently use -1 for temporary file size (#1464)

This commit is contained in:
Chenlei Hu
2024-11-07 23:34:46 -05:00
committed by GitHub
parent 6b6992591b
commit dd192777b7
4 changed files with 6 additions and 4 deletions

View File

@@ -191,7 +191,9 @@ describe('useUserFileStore', () => {
expect(api.storeUserData).toHaveBeenCalledWith(
'newfile.txt',
'file content',
{ throwOnError: true, full_info: true, overwrite: true }
// SaveAs should create a new temporary file, which will mean
// overwrite is false
{ throwOnError: true, full_info: true, overwrite: false }
)
expect(newFile).toBeInstanceOf(UserFile)
expect(newFile.path).toBe('newfile.txt')

View File

@@ -25,7 +25,7 @@ describe('useWorkflowStore', () => {
filenames.map((filename) => ({
path: filename,
modified: new Date().toISOString(),
size: 1 // size !== 0 for remote workflows
size: 1 // size !== -1 for remote workflows
}))
)
return await store.syncWorkflows()