Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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.'
}
}
}
45 changes: 45 additions & 0 deletions Jenkinsfile-ci
Original file line number Diff line number Diff line change
@@ -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.'
}
}
}
3 changes: 2 additions & 1 deletion src/component/listItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class ListItem extends Component {
const { title, desc } = this.props;

if(!title){
console.log("No hay título");
return null;
}

Expand All @@ -27,4 +28,4 @@ ListItem.propTypes = {
desc: PropTypes.string
}

export default ListItem;
export default ListItem;