Skip to content
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

Tests Storage APIs #56

Open
erayerdin opened this issue Feb 2, 2024 · 0 comments
Open

Tests Storage APIs #56

erayerdin opened this issue Feb 2, 2024 · 0 comments
Assignees
Labels
type|bug Something isn't working

Comments

@erayerdin
Copy link
Owner

erayerdin commented Feb 2, 2024

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
@erayerdin erayerdin added the type|bug Something isn't working label Feb 2, 2024
@erayerdin erayerdin self-assigned this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type|bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant