{"id":17001688,"url":"https://github.com/shresht7/criteria","last_synced_at":"2026-05-08T06:42:16.955Z","repository":{"id":45192250,"uuid":"441530534","full_name":"Shresht7/Criteria","owner":"Shresht7","description":"A bare minimum test framework.","archived":false,"fork":false,"pushed_at":"2025-02-11T14:08:28.000Z","size":77,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T08:48:46.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Shresht7.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-24T18:19:12.000Z","updated_at":"2022-01-09T07:28:59.000Z","dependencies_parsed_at":"2024-11-28T18:32:12.690Z","dependency_job_id":"2a291cad-0fd2-4cc9-80ae-486bd6727d43","html_url":"https://github.com/Shresht7/Criteria","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shresht7/Criteria","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FCriteria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FCriteria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FCriteria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FCriteria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/Criteria/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FCriteria/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279374914,"owners_count":26157979,"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-17T02:00:07.504Z","response_time":56,"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-14T04:25:47.280Z","updated_at":"2025-10-17T16:22:25.363Z","avatar_url":"https://github.com/Shresht7.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Criteria\n----------\n\nA super-simple bare minimum test framework.\n\n\u003c!-- \n## Installation\n\nCurrently N/A\n--\u003e\n\n## Usage\n\n```ts\nimport { criteria } from 'criteria'\nimport * as assert from 'assert'    //  Node's builtin assert module\n\n//  Random functions to test\nconst capitalize = (str: string) =\u003e str[0].toUpperCase() + str.slice(1)\nconst hyphenate = (str: string) =\u003e str.replace(/([A-Z])/, '-$1').toLowerCase()\n\nlet str = 'Hello World'\nlet count = 0\n\ncriteria('String Helpers')\n    .beforeEach(() =\u003e str = 'helloWorld')\n\n    .test('Capitalize', () =\u003e assert.deepEqual(capitalize(str), 'HelloWorld'))\n    .test('Hyphenate', () =\u003e assert.deepEqual(hyphenate(str), 'hello-world'))\n\n    .afterEach(() =\u003e console.log(`The count is ${++count}`))\n```\n\n## Expect\n\n`expect` is a chainable wrapper around Node's `assert` that allows you to add multiple validation criteria to a single statement.\n\n```ts\nimport { criteria, expect } from 'criteria'\n\nconst divide = (x: number, y: number) =\u003e x / y\n\ncriteria('Division')\n    .test('x divided by y', () =\u003e {\n        expect(divide(4, 2))\n            .toBeOkay()\n            .toBeOfType('number')\n            .toEqual(2)\n    })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fcriteria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fcriteria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fcriteria/lists"}