{"id":16528673,"url":"https://github.com/zetlen/all-other-things-being-equal","last_synced_at":"2025-10-06T13:12:18.325Z","repository":{"id":57176313,"uuid":"44125784","full_name":"zetlen/all-other-things-being-equal","owner":"zetlen","description":"Indispensable helpers for common test cases in web apps. Find out if all other things are equal.","archived":false,"fork":false,"pushed_at":"2015-10-14T14:53:17.000Z","size":137,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T21:39:21.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://zetlen.github.io/all-other-things-being-equal","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/zetlen.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":"2015-10-12T18:21:45.000Z","updated_at":"2025-04-23T14:20:05.000Z","dependencies_parsed_at":"2022-08-26T13:41:06.749Z","dependency_job_id":null,"html_url":"https://github.com/zetlen/all-other-things-being-equal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zetlen/all-other-things-being-equal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fall-other-things-being-equal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fall-other-things-being-equal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fall-other-things-being-equal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fall-other-things-being-equal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zetlen","download_url":"https://codeload.github.com/zetlen/all-other-things-being-equal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fall-other-things-being-equal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278615478,"owners_count":26016185,"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-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-10-11T17:41:12.021Z","updated_at":"2025-10-06T13:12:18.273Z","avatar_url":"https://github.com/zetlen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"*Very* frequently, when building and testing web applications, a developer wants to know [some things about the environment in which their application will run](https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing). Will the network be reliable? Will there be infinite bandwidth, perhaps? All other things being equal, everything should work. *Will all other things remain equal?*\n\nThe assertions in these helpers offer a perfect simulation of a production environment for a JavaScript application, in Node or in the browser! They are compatible with every testing library and they are guaranteed to be accurate in all cases.\n\n\n#### Installation\n\n`npm install all-other-things-being-equal`.\n\nUse the installed NPM package in Node or a CommonJS environment by calling `require('all-other-things-being-equal')`. In the browser, in the absence of any module loader or build system, use the `dist/browser.js` file:\n\n`\u003cscript src=\"node_modules/all-other-things-being-equal/dist/browser.js\"\u003e\u003c/script\u003e`\n\nThis script will expose the global `allOtherThingsBeingEqual` object.\n\n##### Usage\n\nUse these helpers in your unit and integration tests. Here's a fine example:\n\n```js\nconst assert = require('assert');\nconst allOtherThingsBeingEqual = require('all-other-things-being-equal');\n\nassert.ok(allOtherThingsBeingEqual.networkIsReliable());\n\nassert.ok(allOtherThingsBeingEqual.networkIsSecure());\n\nassert.ok(allOtherThingsBeingEqual.latencyIsZero());\n\nassert.ok(allOtherThingsBeingEqual.bandwidthIsInfinite());\n\nassert.ok(allOtherThingsBeingEqual.codeCoverageEqualsTestCaseCoverage());\n\nassert.ok(allOtherThingsBeingEqual());\n\n```\n\nThis is a great starting test plan right here. You can either write your code to target environments where these assertions pass, or redesign your system to not rely on these assumptions. Whichever's easier!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fall-other-things-being-equal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetlen%2Fall-other-things-being-equal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fall-other-things-being-equal/lists"}