diff --git a/composer.json b/composer.json index a2ba9a4b..9dddfd36 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "doctrine/dbal": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^12.3.5", "mockery/mockery": "^1.5", "fakerphp/faker": "^1.20", "laravel/pint": "^1.0", diff --git a/test/composer-registry.test.ts b/test/composer-registry.test.ts index fd32972d..87257ff5 100644 --- a/test/composer-registry.test.ts +++ b/test/composer-registry.test.ts @@ -32,7 +32,7 @@ describe('RegistryClient - Composer Integration', () => { // Mock file system operations spyOn(fs, 'existsSync').mockReturnValue(true) spyOn(fs, 'readFileSync').mockReturnValue(JSON.stringify({ - require: { + 'require': { 'php': '^8.1', 'laravel/framework': '^10.0', 'guzzlehttp/guzzle': '^7.0', diff --git a/test/package-scanner-ignore-paths.test.ts b/test/package-scanner-ignore-paths.test.ts index 7996e6c8..e5b03ecf 100644 --- a/test/package-scanner-ignore-paths.test.ts +++ b/test/package-scanner-ignore-paths.test.ts @@ -20,11 +20,13 @@ describe('PackageScanner IgnorePaths Integration', () => { try { // Change back to original directory first, before deleting the test directory process.chdir(originalCwd) - } catch (error) { + } + catch { // If we can't change back to original directory, try to change to a safe directory try { process.chdir(tmpdir()) - } catch { + } + catch { // If all else fails, change to root process.chdir('/') } @@ -32,7 +34,8 @@ describe('PackageScanner IgnorePaths Integration', () => { try { await fs.rm(testDir, { recursive: true, force: true }) - } catch (error) { + } + catch (error) { // Ignore cleanup errors - the temp directory will be cleaned up by the OS eventually console.warn(`Failed to clean up test directory ${testDir}:`, error) }