{"id":19933829,"url":"https://github.com/pawap90/test-mongoose-inmemory","last_synced_at":"2025-05-03T11:33:53.941Z","repository":{"id":42175448,"uuid":"217776741","full_name":"pawap90/test-mongoose-inmemory","owner":"pawap90","description":"A sample project that demonstrates how to test mongoose operations through jest with an in-memory database.","archived":false,"fork":false,"pushed_at":"2023-01-07T04:23:31.000Z","size":299,"stargazers_count":42,"open_issues_count":6,"forks_count":15,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-06-14T17:50:17.403Z","etag":null,"topics":["jest","mongodb","mongoose","nodejs","testing"],"latest_commit_sha":null,"homepage":null,"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/pawap90.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-10-26T22:27:52.000Z","updated_at":"2023-06-14T17:50:17.403Z","dependencies_parsed_at":"2023-02-06T11:30:52.917Z","dependency_job_id":null,"html_url":"https://github.com/pawap90/test-mongoose-inmemory","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawap90%2Ftest-mongoose-inmemory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawap90%2Ftest-mongoose-inmemory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawap90%2Ftest-mongoose-inmemory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawap90%2Ftest-mongoose-inmemory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pawap90","download_url":"https://codeload.github.com/pawap90/test-mongoose-inmemory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224360099,"owners_count":17298319,"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":["jest","mongodb","mongoose","nodejs","testing"],"created_at":"2024-11-12T23:14:59.659Z","updated_at":"2024-11-12T23:14:59.747Z","avatar_url":"https://github.com/pawap90.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Node.js + Mongoose + Jest sample project that demonstrates **how to test mongoose operations using Jest with an in-memory database**.\n\n\u003eThis repo was build as an example for my article [Testing Node.js + Mongoose with an in-memory database](https://dev.to/paulasantamaria/testing-node-js-mongoose-with-an-in-memory-database-32np).\n\n# Dependencies\nWhat you need to run this project:\n- Node.js\n\n(MongoDB is not required because it'll run in memory, handled by the package `mongodb-memory-server`).\n\n# Try it out\n## 1. Install dependencies\n```\nnpm install\n```\n\n## 2. Run tests\n```\nnpm test\n```\n\n# Contribute\nFeel free to contribute to this project either by leaving your comments and suggestions in the Issues section or creating a PR. More and diverse test examples are always useful. Make sure to take a look at Jest docs and the existent examples to avoid repeating.\n\n# Tools\nMain tools used in this project:\n\n- [Mongoose](https://mongoosejs.com/)\n- [Jest](https://jestjs.io/)\n- [mongodb-memory-server package by @nodkz](https://github.com/nodkz/mongodb-memory-server)\n\n\u003e Also take a look at [mongodb-memory-server-global](https://github.com/nodkz/mongodb-memory-server#mongodb-memory-server-global) to download mongod's binary globally and [mongodb-memory-server-core](https://github.com/nodkz/mongodb-memory-server#mongodb-memory-server-core) if you'll run the test on a server that already has mongod installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawap90%2Ftest-mongoose-inmemory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawap90%2Ftest-mongoose-inmemory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawap90%2Ftest-mongoose-inmemory/lists"}