{"id":15777131,"url":"https://github.com/healeycodes/earn-a-build-passing-badge","last_synced_at":"2025-05-07T02:42:09.805Z","repository":{"id":112378036,"uuid":"176816894","full_name":"healeycodes/earn-a-build-passing-badge","owner":"healeycodes","description":"The files for my tutorial on continuous intregration with Jest, Express, and Travis CI ✅","archived":false,"fork":false,"pushed_at":"2019-03-22T23:35:01.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-05T17:42:38.633Z","etag":null,"topics":["express","jest","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/healeycodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T21:05:14.000Z","updated_at":"2024-07-08T21:07:27.000Z","dependencies_parsed_at":"2023-05-14T04:00:32.455Z","dependency_job_id":null,"html_url":"https://github.com/healeycodes/earn-a-build-passing-badge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fearn-a-build-passing-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fearn-a-build-passing-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fearn-a-build-passing-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fearn-a-build-passing-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healeycodes","download_url":"https://codeload.github.com/healeycodes/earn-a-build-passing-badge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802580,"owners_count":21806530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","jest","travis-ci"],"created_at":"2024-10-04T17:42:53.515Z","updated_at":"2025-05-07T02:42:09.783Z","avatar_url":"https://github.com/healeycodes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/healeycodes/earn-a-build-passing-badge.svg?branch=master)](https://travis-ci.com/healeycodes/earn-a-build-passing-badge)\n\n### Earn a Build Passing Badge on GitHub ✅! Testing Your Express App with Travis CI\n\n\u003cbr\u003e\n\nThis repo contains the are the files for [my tutorial](https://healeycodes.github.io/javascript/webdev/github/beginners/2019/03/15/build-passing-badge.html) on continuous intregration with Jest, Express, and Travis CI.\n\nIt also serves as a live example! Whenever there is a commit to `master`, Travis CI will queue up a new test build.\n\nThe result of that build will affect the Build Status badge you see at the top there. If the build fails, I will get an email too.\n\n\u003cbr\u003e\n\n`npm i` will install all of the dependencies. The rest of the application — how to run and test it — is explained below.\n\n\u003cbr\u003e\n\n#### app.js\n\nThis contains our application routes and logic.\n\n```javascript\nconst express = require('express');\nconst app = express();\n\napp.get('/', async (req, res) =\u003e res.status(200).send('Hello World!'));\n\nmodule.exports = app;\n```\n\n\u003cbr\u003e\n\n#### server.js\n\n`npm start` will run this file, running the application.\n\n```javascript\nconst app = require('./app');\nconst port = 3000;\n\napp.listen(port, () =\u003e console.log(`Example app listening on port ${port}!`))\n```\n\n\u003cbr\u003e\n\n#### app.test.js\n\nHere are our tests for Jest to run when `npm test` is called.\n\n```javascript\nconst app = require('../app');\nconst request = require('supertest');\n\ndescribe('GET /', () =\u003e {\n    it('responds with 200', async () =\u003e {\n        await request(app)\n            .get('/')\n            .expect(200);\n    });\n})\n```\n\n\u003cbr\u003e\n\n#### .travis.yml\n\nThis file tells Travis CI [how to setup testing](https://docs.travis-ci.com/user/customizing-the-build/) for the repository. Make sure you've installed Travis CI as a GitHub App and toggled on repository permissions.\n\n```yml\nlanguage: node_js\nnode_js:\n- lts/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fearn-a-build-passing-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealeycodes%2Fearn-a-build-passing-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fearn-a-build-passing-badge/lists"}