fix: resolve TypeScript linting errors in test files
- Fix unsafe return of any type in ScriptsGrid.test.tsx - Fix unsafe argument type in scripts.test.ts - Remove unused variable warning in scripts.test.ts - All tests now pass TypeScript strict mode validation
This commit is contained in:
@@ -34,7 +34,7 @@ vi.mock('../ScriptDetailModal', () => ({
|
||||
isOpen ? (
|
||||
<div data-testid="script-detail-modal">
|
||||
<button onClick={onClose}>Close</button>
|
||||
<button onClick={() => onInstallScript?.('/test/path', 'test-script')}>Install</button>
|
||||
<button onClick={() => { onInstallScript?.('/test/path', 'test-script') }}>Install</button>
|
||||
</div>
|
||||
) : null,
|
||||
}))
|
||||
|
||||
@@ -169,7 +169,7 @@ describe('ScriptManager', () => {
|
||||
logo: 'test-logo.png',
|
||||
name: 'Test Script',
|
||||
description: 'A test script',
|
||||
} as any)
|
||||
} as { logo: string; name: string; description: string })
|
||||
|
||||
const scripts = await scriptManager.getCtScripts()
|
||||
|
||||
@@ -280,7 +280,7 @@ describe('ScriptManager', () => {
|
||||
}
|
||||
mockSpawn.mockReturnValue(mockChildProcess as any)
|
||||
|
||||
const childProcess = await scriptManager.executeScript('/test/scripts/script.py')
|
||||
await scriptManager.executeScript('/test/scripts/script.py')
|
||||
|
||||
expect(mockSpawn).toHaveBeenCalledWith('python', ['/test/scripts/script.py'], {
|
||||
cwd: '/test/scripts',
|
||||
|
||||
Reference in New Issue
Block a user