Moved console.log outside of conditional block to ensure it runs
at the top level, which is required for proper test filtering to work.
Co-authored-by: David Bauch <jamesbauch@gmail.com>
Added console.log message to help with test filtering when
DROPBOX_TEST_ACCESS_TOKEN is set, making it easier to identify
when integration tests are running vs being skipped.
Co-authored-by: David Bauch <jamesbauch@gmail.com>
Integration tests now automatically skip when DROPBOX_TEST_ACCESS_TOKEN
is not set, allowing CI to pass without requiring external API credentials.
Tests will run normally when a valid token is provided.
Addressed issue where different Dropbox API endpoints return different response
structures - filesCreateFolderV2 omits .tag field while other endpoints include it.
Changes:
- Added forceType parameter to mapToFile for explicit type handling
- Force folder type for filesCreateFolderV2 responses
- Force file type for filesUpload responses for consistency
- Cleaned up debug logging and made code production-ready
- All 36 unit tests passing, folder creation now correctly returns type 'folder'
Added forceType parameter to mapToFile to explicitly mark folder creations.
This bypasses tag detection issues with real Dropbox API responses.
Extensive debug logging added to diagnose API response structure differences.
Make mapToFile method more defensive when handling Dropbox API responses.
The real API response structure may vary from TypeScript definitions,
so this handles both expected format and potential variations to ensure
folders are correctly identified as type 'folder' instead of 'file'.
The problematic test was sharing mock client state with other tests.
Created createProviderWithFreshMockClient() to provide isolated mock
clients for tests that need complete isolation from shared state.
The rename/move test now uses its own fresh mock client instance.
Simplified the 'should rename/move file' test by removing the isolated
mock approach that was causing issues in CI. The test now uses the
standard mock client pattern consistent with other tests, which
resolves the mock function call count mismatch that was occurring
in CI but not locally.