jest.setMock('../prompt-installation',{promptInstallation:jest.fn(),});constExternalCommand=require('../resolve-command');const{packageExists}=require('../package-exists');const{promptInstallation}=require('../prompt-installation');describe('@webpack-cli/utils',()=>{it('should check existence of package',()=>{// use an actual path relative to the packageUtils fileexpect(packageExists('./logger')).toBeTruthy();expect(packageExists('./nonexistent-package')).toBeFalsy();});it('should not throw if the user interrupts',async()=>{promptInstallation.mockImplementation(()=>{thrownewError();});awaitexpect(ExternalCommand('info')).resolves.not.toThrow();});});