@patch('salt.modules.npm._check_valid_version',
           MagicMock(return_value=True))
    def test_list(self):
        mock = MagicMock(return_value={'retcode': 1, 'stderr': 'error'})
        with patch.dict(npm.__salt__, {'cmd.run_all': mock}):
            self.assertRaises(CommandExecutionError, npm.list_, 'coffee-script')

        mock = MagicMock(return_value={'retcode': 0, 'stderr': 'error',
                                       'stdout': '{"salt": ["SALT"]}'})
        with patch.dict(npm.__salt__, {'cmd.run_all': mock}):
            mock_err = MagicMock(return_value={'dependencies': 'SALT'})
            with patch.object(json, 'loads', mock_err):
                self.assertEqual(npm.list_('coffee-script'), 'SALT')

    # 'cache_clean' function tests: 1
If both the db_entity and vcs_entity are None, raise a
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/npm_test.py/NpmTestCase.test_list--crossover with--dataset/ETHPy150Open mozilla/pontoon/pontoon/sync/tests/test_core.py/UpdateEntityTests.test_none