Skip to content

Tests Storage APIs #56

@erayerdin

Description

@erayerdin

Currently, testing Storage with emulator strangely throws an error. This is documented in the code in useUploadFile.test.ts with comments as such:

// this test fails for some reason with this
    //     FirebaseError: Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)
    // ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
    // Serialized Error: { code: 'storage/unknown', customData: { serverResponse: '' }, status_: 400, _baseMessage: 'Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)', status: 400, _codeEquals: 'Function<_codeEquals>', serverResponse: '' }

    // the reason might be happy-dom, which mocks `window` and `document` API
    // end to end testing with `playwright` or `cypress` might be a solution
    // but requires too much effort and integrating with current codebase (with vite and vitest)
    // is not documented very well
    // so, skipping this test for now to await for future issues

Metadata

Metadata

Assignees

Labels

type|bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions