{"id":20210368,"url":"https://github.com/qoh/tes","last_synced_at":"2026-04-21T16:32:45.517Z","repository":{"id":150077354,"uuid":"151766540","full_name":"qoh/tes","owner":"qoh","description":"Test runner for deno","archived":false,"fork":false,"pushed_at":"2020-05-10T06:30:21.000Z","size":18,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T10:42:39.634Z","etag":null,"topics":["deno","test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/qoh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-05T19:09:25.000Z","updated_at":"2020-05-10T06:30:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0d3c19c-d77c-4d1d-9b91-fae17faa5d34","html_url":"https://github.com/qoh/tes","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/qoh/tes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoh%2Ftes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoh%2Ftes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoh%2Ftes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoh%2Ftes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qoh","download_url":"https://codeload.github.com/qoh/tes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoh%2Ftes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262520780,"owners_count":23323768,"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":["deno","test"],"created_at":"2024-11-14T05:47:34.800Z","updated_at":"2026-04-21T16:32:40.489Z","avatar_url":"https://github.com/qoh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Summary\n\nTeset (pronounced Tessie) is a test runner for [deno](https://github.com/denoland/deno) based on simple concepts: exporting tests as functions (potentially nested or async), and throwing to indicate failure.\n\nWrite a test file like `example.ts`:\n\n```javascript\nexport async function ok() {\n\t// all good, your tests may be async\n}\n\nexport function fail() {\n\tthrow new Error(\"Snowball not calibrated\");\n}\n\nexport const nested = {\n\tflint() { },\n\tdeeply: {\n\t\tchance() { },\n\t},\n};\n```\n\nThen run it:\n\n```\nteset example\n```\n\n```\nFinding tests\nFound 4 tests, running\n\n/path/to/.../example [0ms]\n\n ✅  ok [0ms]\n\n ❌  fail [0ms]\n    Error: Snowball not calibrated\n        at Object.fail [as fn ] (file:///.../example.ts:6:8)\n        at ...\n\n ✅  nested.flint [0ms]\n ✅  nested.deeply.chance [0ms]\n\n3/4 succeeded, 1 failed\n```\n\n## Try it\n\nYou can try this right now without installing if you have deno:\n\n```shell\ndeno run --allow-read https://cdn.rawgit.com/qoh/teset/v0.2.1/src/main.ts -- \\\n     https://cdn.rawgit.com/qoh/teset/v0.2.1/example/example.ts\n```\n\nOr with a local file:\n\n```shell\ndeno run --allow-read https://cdn.rawgit.com/qoh/teset/v0.2.1/src/main.ts -- example.ts\n```\n\n# Test API\n\nFor assertions, see [assert](https://github.com/qoh/assert).\n\n```javascript\nimport { ... } from \"https://cdn.rawgit.com/qoh/teset/v0.2.1/src/api.ts\";\n```\n\n---\n\n```typescript\nfunction throws(test: Function): () =\u003e Promise\u003cvoid\u003e;\nfunction throws(constructor: Function, test: Function): () =\u003e Promise\u003cvoid\u003e;\nfunction throws(message: string, test: Function): () =\u003e Promise\u003cvoid\u003e;\nfunction throws(constructor: Function, message: string, test: Function): () =\u003e Promise\u003cvoid\u003e;\n```\n\nCreate a test that expects `test` to throw.\n\nGiven `constructor`, the error is asserted to be an instance of it.\n\nGiven `message`, the message of the error is asserted to be equal.\n\n```javascript\nexport const fails = throws(TypeError, \"null is not a function\", () =\u003e {\n    null();\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoh%2Ftes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqoh%2Ftes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoh%2Ftes/lists"}