Skip to content

Commit b51178f

Browse files
jet-pangclaude
andcommitted
fix: remove unused variables and imports
- Remove unused hasThemeStyles variable in theme-manager.test.ts - Remove unused file variable in upload-adapter.test.ts - Remove unused resolvedUrl variable in upload-adapter.test.ts - Remove unused imports (PLUGIN_REGISTRY, getGlobalPluginRegistry, FilterOptions) from vaadin-ckeditor.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f3233d0 commit b51178f

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

src/main/resources/META-INF/frontend/vaadin-ckeditor/theme-manager.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ describe('ThemeManager CSS variable injection', () => {
178178

179179
manager.initialize('dark', callback);
180180

181-
// Check if style element was created
182-
const styleElements = document.querySelectorAll('style');
183-
const hasThemeStyles = Array.from(styleElements).some(
184-
(el) => el.textContent?.includes('--ck-color')
185-
);
186-
187181
// Theme manager injects CSS variables for dark mode
188182
expect(callback).toHaveBeenCalledWith('dark');
189183

src/main/resources/META-INF/frontend/vaadin-ckeditor/upload-adapter.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ describe('UploadAdapterManager', () => {
3232

3333
describe('file size validation', () => {
3434
it('should use default max file size of 10MB', () => {
35-
// Create a mock file loader
36-
const file = new File(['x'.repeat(5 * 1024 * 1024)], 'small.jpg', {
37-
type: 'image/jpeg',
38-
});
39-
4035
// File under 10MB should be accepted (we test via MIME type validation first)
4136
expect(manager.isMimeTypeAllowed('image/jpeg')).toBe(true);
4237
});
@@ -130,7 +125,6 @@ describe('UploadAdapterManager', () => {
130125
it('should resolve pending upload with URL', () => {
131126
// Simulate a pending upload
132127
const uploadId = 'test-upload-1';
133-
let resolvedUrl: string | undefined;
134128

135129
// We need to mock the internal pending uploads map
136130
// This tests the public resolveUpload method

src/main/resources/META-INF/frontend/vaadin-ckeditor/vaadin-ckeditor.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ import { UploadAdapterManager } from './upload-adapter';
1313
import { FallbackRenderer, type FallbackMode } from './fallback-renderer';
1414
import {
1515
PluginResolver,
16-
PLUGIN_REGISTRY,
1716
registerCKEditorPlugin,
18-
getGlobalPluginRegistry,
1917
type PluginConfig,
20-
type FilterOptions,
2118
} from './plugin-resolver';
2219

2320
// Import sticky toolbar CSS (extracted for maintainability)

0 commit comments

Comments
 (0)