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

fix #197: return sync callback when using the sync interface, otherwise return the async callback #220

Merged
merged 4 commits into from
Jan 27, 2020

Conversation

silkentrance
Copy link
Collaborator

@silkentrance silkentrance commented Jan 27, 2020

internally, we still use the synchronous remove functions on process exit.

@silkentrance
Copy link
Collaborator Author

silkentrance commented Jan 27, 2020

file tests using name option fails in before hook on appveyor while it succeeds on both my local linux machine and travis.

need to investigate this further:

  1) tmp
       #file()
         when running inband standard tests
           with name
             "before all" hook: bound before for "should return a proper result":
     Error: EPERM: operation not permitted, open 'C:\Users\appveyor\AppData\Local\Temp\1\tmp-using-name'

file tests are run after dir tests. it seems as if the temporary directory created by the dir tests had not been removed, even though that the assertion for checking whether the directory does not exists will not fail during testing.

for now, putting a guard around the call to the sync cleanup callback in case that fileSync tests leave behind some remnants.

next: test this on a windows machine.

@silkentrance
Copy link
Collaborator Author

silkentrance commented Jan 27, 2020

actually calling the sync cleanup callback during test seems to have done the trick.
still wondering why rimraf fails on non existent files, though.

@silkentrance silkentrance merged commit 68ce567 into master Jan 27, 2020
@silkentrance silkentrance deleted the gh-197 branch January 27, 2020 17:25
@silkentrance
Copy link
Collaborator Author

silkentrance commented Jan 27, 2020

TODO: we might have a missing test here: sync file and dir operations must return the fully qualified path and not just the name that was either provided in the opts or that was generated by tmpName*.

then again, we have in assertions both assertExists and assertDoesNotExist.

so we need to investigate, better be sure than sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant