feat(webdav): resolve failing etag unit tests

This commit is contained in:
perf3ct 2025-07-05 21:16:15 +00:00
parent b184f0f68f
commit ab610bc33f
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,5 @@
import { describe, test, expect } from 'vitest'; import { describe, test, expect } from 'vitest';
import Login from '../Login';
// Basic existence test for Login component // Basic existence test for Login component
// More complex auth tests require comprehensive context mocking which // More complex auth tests require comprehensive context mocking which
@ -10,10 +11,9 @@ describe('Login - OIDC Features - Simplified', () => {
expect(true).toBe(true); expect(true).toBe(true);
}); });
test('Component module structure is valid', async () => { test('Component module structure is valid', () => {
// Test that the module can be imported dynamically // Test that the module can be imported statically
const module = await import('../Login'); expect(Login).toBeDefined();
expect(module).toBeDefined(); expect(typeof Login).toBe('function');
expect(module.default).toBeDefined();
}); });
}); });

View File

@ -538,7 +538,7 @@ pub fn normalize_etag(etag: &str) -> String {
// Handle empty ETags or whitespace-only ETags // Handle empty ETags or whitespace-only ETags
if result.trim().is_empty() { if result.trim().is_empty() {
return "empty".to_string(); // Provide a consistent fallback return "".to_string(); // Return empty string for empty ETags
} }
result result