{"id":20550546,"url":"https://github.com/guywaldman/db_systems_hw4_tests","last_synced_at":"2026-06-05T17:31:20.636Z","repository":{"id":209944797,"uuid":"117604688","full_name":"guywaldman/db_systems_hw4_tests","owner":"guywaldman","description":"Tests for 236363 HW4 wet","archived":false,"fork":false,"pushed_at":"2018-01-21T22:09:36.000Z","size":1206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T14:17:43.686Z","etag":null,"topics":[],"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/guywaldman.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}},"created_at":"2018-01-15T23:03:27.000Z","updated_at":"2018-01-16T00:30:52.000Z","dependencies_parsed_at":"2023-11-29T23:47:34.514Z","dependency_job_id":null,"html_url":"https://github.com/guywaldman/db_systems_hw4_tests","commit_stats":null,"previous_names":["guywaldman/db_systems_hw4_tests"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guywaldman%2Fdb_systems_hw4_tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guywaldman%2Fdb_systems_hw4_tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guywaldman%2Fdb_systems_hw4_tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guywaldman%2Fdb_systems_hw4_tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guywaldman","download_url":"https://codeload.github.com/guywaldman/db_systems_hw4_tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242157176,"owners_count":20081036,"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":[],"created_at":"2024-11-16T02:25:33.043Z","updated_at":"2026-06-05T17:31:20.541Z","avatar_url":"https://github.com/guywaldman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HW4 Wet Tests 🚀\n\n## Caveat\n\nThese tests might not be 100% accurate, may contain mistakes and may contain false positives/negatives.\nPlease use them at your discretion\n\n## Requirements\n\n* MongoDB shell version: `\u003e=3.4.6`\n* MongoDB server version: `\u003e=3.4.6`\n\n## Usage\n\n### With Node.js\n\n\u003e Make sure that you've moved `script.js` to the root directory, the NPM scripts rely on this.\n\n```bash\n$ npm run test\n```\n\n### Without Node.js\n\n\u003e Assuming your MongoDB server is running on localhost:27017.\n\u003e Otherwise, run instead of the first command, for example:\n\u003e ```bash\n\u003e   # replace \u003caddress:port\u003e as needed\n\u003e $ mongo \u003caddress:port\u003e test/lib/populate.js\n\u003e ```\n\n```bash\n  # populate the DB\n$ mongo test/lib/populate.js\n  # run your script\n$ mongo script.js\n  # run the test\n$ mongo test/script.test.js\n  # drop the collections\n$ mongo test/lib/destroy.js\n```\n\n### If the above doesn't work\n\nTry running from the mongo shell:\n\n```javascript\n#!/usr/local/bin/mongo\n\n// populate the DB\nload('test/lib/populate.js');\n// run your script\nload('script.js');\n// run the test\nload('test/script.test.js');\n// drop the collections\nload('test/lib/destroy.js');\n```\n\nIn either case, you can always just run the `populate.js` script which (surprise, surprise) populates the DB, running your script and then comparing the `results1, results2, results3` collections to the expected one (see the [diffing](https://github.com/guywald1/db_systems_hw4_tests#diffing) part).\n\n## Output\n\nIf you passed, there should be no special output.\nSomething like this:\n\n\u003cimg src=\"./assets/screenshot_passed.png\" alt=\"screenshot\" height=\"361\" width=\"451\"/\u003e\n\nIf you failed, there should be indication as to which test you've failed (and sometimes a suggestion as to why you probably failed).\n\n\u003cimg src=\"./assets/screenshot_failed.png\" alt=\"screenshot\" height=\"368\" width=\"451\"/\u003e\n\n## Diffing\n\nTo see expected output, run:\n\n```bash\n$ mongo test/lib/showExpected.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguywaldman%2Fdb_systems_hw4_tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguywaldman%2Fdb_systems_hw4_tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguywaldman%2Fdb_systems_hw4_tests/lists"}