{"id":18552432,"url":"https://github.com/andrejewski/permutest","last_synced_at":"2025-04-09T22:31:53.025Z","repository":{"id":57322253,"uuid":"44686055","full_name":"andrejewski/permutest","owner":"andrejewski","description":"Test all possible permutations of values sanely","archived":false,"fork":false,"pushed_at":"2015-10-21T17:21:02.000Z","size":144,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T00:02:38.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrejewski.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}},"created_at":"2015-10-21T15:31:13.000Z","updated_at":"2019-03-28T16:37:59.000Z","dependencies_parsed_at":"2022-08-25T22:41:45.803Z","dependency_job_id":null,"html_url":"https://github.com/andrejewski/permutest","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/andrejewski%2Fpermutest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fpermutest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fpermutest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejewski%2Fpermutest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrejewski","download_url":"https://codeload.github.com/andrejewski/permutest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123734,"owners_count":21051521,"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-06T21:14:12.804Z","updated_at":"2025-04-09T22:31:52.714Z","avatar_url":"https://github.com/andrejewski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Permutest\n\nPermutest is a testing utility that makes the testing of all possible combinations/permuations of multiple variables much saner and clean.\n\n```bash\nnpm install permutest\n```\n\nPermutest is independent of any testing framework or library and can be used for other things besides testing as well.\n\n## Example\n\n```js\nvar assert = require('assert');\nvar permutest = require('permutest');\n\npermutest(function(set) {\n  var firstName = set([\"Chris\", \"Kevin\"]);\n  var lastName = set([\"Andrejewski\", \"Undisclosed\", \"Withheld\"]);\n  var fullName = firstName + \" \" + lastName;\n  assert(nameIsLongEnough(fullName));\n});\n```\n\nThe above is equivalent to the following.\n\n```js\nvar assert = require('assert');\n\nvar firstName = \"Chris\";\nvar lastName = \"Andrejewski\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n\nvar firstName = \"Chris\";\nvar lastName = \"Undisclosed\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n\nvar firstName = \"Chris\";\nvar lastName = \"Withheld\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n\nvar firstName = \"Kevin\";\nvar lastName = \"Andrejewski\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n\nvar firstName = \"Kevin\";\nvar lastName = \"Undisclosed\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n\nvar firstName = \"Kevin\";\nvar lastName = \"Withheld\";\nvar fullName = firstName + \" \" + lastName;\nassert(nameIsLongEnough(fullName));\n```\n\nBut who the heck would want to write and maintain that instead of just using Permutest.\n\n## TODO\n\nThe only feature that I would like to add to the Permutest package is a static analysis and compilation tool that expands out Permutest tests into their long and tedious forms. This would involve writing a command-line script and generating the AST to find calls to `permutest()` and so on from there to generate the test code in place. This would be useful for inspecting individual test cases.\n\n## Contributing\n\nWe can always have more tests: if you find a bug, create an issue or be **fabulous** and fix the problem and write the tests up yourself in a coherent pull request.\n\nRun tests with the `npm test` command.\n\nPlease check out my other [repositories](https://github.com/andrejewski) if I have earned it. I thank you for reading.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejewski%2Fpermutest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrejewski%2Fpermutest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejewski%2Fpermutest/lists"}