diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3f329ab --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + git branch: 'feature/debugging_consoleLog', url: 'https://github.com/munoz138255/Testing-React-Redux-with-Jest-and-Enzyme' + } + } + + stage('Build') { + steps { + sh 'npm install' // Ajusta según tu stack + } + } + + stage('Testing') { + steps { + sh 'npm test' // Ejecuta los tests + } + } + } + + post { + success { + echo 'Build y testing completados con éxito.' + } + failure { + echo 'Error en la build o tests.' + } + } +} diff --git a/Jenkinsfile-ci b/Jenkinsfile-ci new file mode 100644 index 0000000..a766065 --- /dev/null +++ b/Jenkinsfile-ci @@ -0,0 +1,45 @@ +pipeline { + agent any + + environment { + DEPLOY_DIR = '/home/alumno/Documentos/Usuarios/practica9/Testing-React-Redux-with-Jest-and-Enzyme' + } + + stages { + stage('Checkout') { + steps { + script { + // Clonar el código en la rama feature actual + git branch: env.BRANCH_NAME, url: 'https://github.com/munoz138255/Testing-React-Redux-with-Jest-and-Enzyme.git' + } + } + } + + stage('Build') { + steps { + script { + echo "Construyendo proyecto en la rama ${env.BRANCH_NAME}" + sh 'npm install' + } + } + } + + stage('Testing') { + steps { + script { + echo "Ejecutando pruebas en la rama ${env.BRANCH_NAME}" + sh 'npm test' + } + } + } + } + + post { + success { + echo 'Pipeline CI ejecutado correctamente en la rama feature.' + } + failure { + echo 'Hubo un error en la ejecución del pipeline CI.' + } + } +} diff --git a/src/component/listItem/index.js b/src/component/listItem/index.js index 6b1b5a6..537cd39 100644 --- a/src/component/listItem/index.js +++ b/src/component/listItem/index.js @@ -7,6 +7,7 @@ class ListItem extends Component { const { title, desc } = this.props; if(!title){ + console.log("No hay título"); return null; } @@ -27,4 +28,4 @@ ListItem.propTypes = { desc: PropTypes.string } -export default ListItem; \ No newline at end of file +export default ListItem;