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

Use memory file system when running unit tests #19

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

atn832
Copy link
Owner

@atn832 atn832 commented Jun 30, 2022

This fixes errors in unit tests introduced in #12 (link):

  FileSystemException: Cannot retrieve length of file, path = 'someimage.png' (OS Error: No such file or directory, errno = 2)
  dart:io                                                                _File.lengthSync
  package:firebase_storage_mocks/src/mock_storage_reference.dart 105:90  MockReference._createFullMetadata
  package:firebase_storage_mocks/src/mock_storage_reference.dart 26:38   MockReference.putFile

Instead of referring to a file on the file system which does not exist, we use the memory file system to set up a file with actual data.

@atn832 atn832 merged commit 7b06d6a into master Jun 30, 2022
@atn832 atn832 deleted the virtual-file-for-tests branch June 30, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant