{"id":16349619,"url":"https://github.com/arojunior/tests-with-nodejs-graphql","last_synced_at":"2025-07-21T18:35:43.187Z","repository":{"id":41782014,"uuid":"166809272","full_name":"arojunior/tests-with-nodejs-graphql","owner":"arojunior","description":"WIP - Integration tests with NodeJs and GraphQL","archived":false,"fork":false,"pushed_at":"2023-01-24T13:59:21.000Z","size":338,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T13:21:35.496Z","etag":null,"topics":["graphql","hacktoberfest","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arojunior.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-21T12:19:06.000Z","updated_at":"2022-10-28T14:21:22.000Z","dependencies_parsed_at":"2023-01-25T11:02:05.493Z","dependency_job_id":null,"html_url":"https://github.com/arojunior/tests-with-nodejs-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arojunior/tests-with-nodejs-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arojunior%2Ftests-with-nodejs-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arojunior%2Ftests-with-nodejs-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arojunior%2Ftests-with-nodejs-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arojunior%2Ftests-with-nodejs-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arojunior","download_url":"https://codeload.github.com/arojunior/tests-with-nodejs-graphql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arojunior%2Ftests-with-nodejs-graphql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266352836,"owners_count":23915824,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["graphql","hacktoberfest","nodejs"],"created_at":"2024-10-11T01:00:28.300Z","updated_at":"2025-07-21T18:35:43.165Z","avatar_url":"https://github.com/arojunior.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integration Tests with NodeJs and GraphQL\n\n### Goal\n\nIt is using Docker, so to run it in the CI environment, I need to make sure that the database is up and with all migrations applied before run tests.\n\n**How can I do it?**\n\nThe [arojunior/flyway:5.2.4](https://github.com/arojunior/flyway) image help to handle the migrations. It is using the \"wait-for-it\" script to wait for MySQL container before execute the migrations.\n\nThe other helper is the `config/setupTests.js` script. It is used to get the database up and wait for the migrations being applied before start the tests.\n\n### What you can find here\n\n- Boilerplate for NodeJs + GraphQL applications;\n- Good example for types and schema organization;\n- ESLint already configured.\n\n### Problem that I want to solve for tests\n\n- Reliable test, I mean, not just for schema;\n- Easy to setup;\n- Easy to understand;\n\n### Runnning the tests\n\n**Locally**\n\n```sh\ndocker-compose up -d\n```\n\nAfter all the containers get up, you can run\n```sh\nyarn \u0026\u0026 yarn test\n```\n\n**On CI**\n```sh\nyarn \u0026\u0026 yarn test-ci\n```\nThe `test-ci` script will execute the `setupTests.js` before running the tests, which is prepared to start all the containers and wait for the migrations to be completed","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farojunior%2Ftests-with-nodejs-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farojunior%2Ftests-with-nodejs-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farojunior%2Ftests-with-nodejs-graphql/lists"}