{"id":15447982,"url":"https://github.com/hazae41/phobos","last_synced_at":"2026-05-03T11:34:07.113Z","repository":{"id":65391437,"uuid":"576927926","full_name":"hazae41/phobos","owner":"hazae41","description":"Modern and minimalist testing library for the web","archived":false,"fork":false,"pushed_at":"2025-10-25T10:49:33.000Z","size":260,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T20:51:36.423Z","etag":null,"topics":["asynchronous","browser","concurrency","deno","esmodules","fast","javascript","minimalist","parallel-computing","testing","typescript","unit-testing","web"],"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/hazae41.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["hazae41"],"patreon":"hazae41"}},"created_at":"2022-12-11T12:55:02.000Z","updated_at":"2025-10-25T10:49:36.000Z","dependencies_parsed_at":"2025-09-23T18:07:57.825Z","dependency_job_id":"ca7b3950-7021-4b41-8a4a-91f936aaf832","html_url":"https://github.com/hazae41/phobos","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/hazae41/phobos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fphobos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fphobos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fphobos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fphobos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazae41","download_url":"https://codeload.github.com/hazae41/phobos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fphobos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asynchronous","browser","concurrency","deno","esmodules","fast","javascript","minimalist","parallel-computing","testing","typescript","unit-testing","web"],"created_at":"2024-10-01T20:21:21.147Z","updated_at":"2026-05-03T11:34:07.109Z","avatar_url":"https://github.com/hazae41.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hazae41","https://patreon.com/hazae41"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"500\" src=\"https://user-images.githubusercontent.com/4405263/208164108-5be58f53-a29b-46b3-be90-3886f4afc32d.png\" /\u003e\n\u003c/div\u003e\n\u003ch3 align=\"center\"\u003e\nModern and minimalist testing library\n\u003c/h3\u003e\n\n```bash\nnpm install @hazae41/phobos\n```\n\n```bash\ndeno install jsr:@hazae41/phobos\n```\n\n[**📦 NPM**](https://www.npmjs.com/package/@hazae41/phobos) • [**📦 JSR**](https://jsr.io/@hazae41/phobos)\n\n## Philosophy 🧠\n\nPhobos aims to be minimalist and to always work no matter the:\n- runtime (Node, Deno, browser)\n- module resolution (ESM, CommonJS)\n- language (TypeScript, JavaScript)\n- bundler (Rollup, Vite)\n\nIt's just a library you can import everywhere! That's it, no CLI, no configuration file, just JavaScript.\n\n## Features 🔥\n\n### Current features\n\n- 100% TypeScript and ESM\n- No external dependency\n- Unit tested (by itself)\n- Runnable in the browser\n- Minimalist assertion helpers\n- Asynchronous fork-join parallelism\n- Function calls spying\n\n## Usage 🚀\n\n```typescript\nimport { assert, test } from \"@hazae41/phobos\"\n\ntest(\"it should work\", () =\u003e {\n  assert(false, \"oh no\")\n})\n```\n\n### Concurrent tests\n\nTest blocks are always executed concurrently, unless you `await` them\n\n```typescript\nimport { assert, test } from \"@hazae41/phobos\"\n\ntest(\"it should work\", async ({ test }) =\u003e {\n  \n  // run in sequence\n  await test(\"first test\", async () =\u003e {\n    assert(true, \"should be true\")\n  })\n  \n  // or in parallel\n  test(\"second test\", async () =\u003e {\n    assert(true, \"should be true\")\n  })\n})\n```\n\nYou can also use `await Promise.all(...)` to forcefully join\n\n```typescript\nimport { assert, test } from \"@hazae41/phobos\"\n\ntest(\"it should work\", async ({ test }) =\u003e {\n  const tests = []\n  \n  tests.push(test(\"first test\", async () =\u003e {\n    assert(true, \"should be true\")\n  }))\n  \n  tests.push(test(\"second test\", async () =\u003e {\n    assert(true, \"should be true\")\n  }))\n\n  // wait first and second tests\n  await Promise.all(tests)\n\n  tests.push(test(\"third test\", async () =\u003e {\n    assert(true, \"should be true\")\n  }))\n\n  // wait last test\n  await Promise.all(tests)\n})\n```\n\n### Spying function calls\n\nYou can spy on function calls using `spy(function)`\n\nYou can then `.call()` it and get a list of all its `.calls`\n\n```typescript\nimport { assert, test, spy } from \"@hazae41/phobos\"\n\ntest(\"it should work\", async () =\u003e {\n  const f = spy((param: boolean) =\u003e !param)\n\n  const result = f.call(true)\n  assert(result === false, `result should be false`)\n\n  assert(f.calls.length === 1, `should have been called 1 time`)\n  assert(f.calls[0].params[0] === true, `should have been called with true`)\n  assert(f.calls[0].result === false, `should have resulted in false`)\n})\n```\n\n## Running 🏎️\n\n#### Node\n\n```bash\nnode --test --test-concurrency=1 ./out/**/*.test.js\n```\n\n#### Deno\n\n```bash\ndeno test ./src/**/*.test.ts\n```\n\n#### Other\n\n```typescript\nawait import(\"./mymodule.test.ts\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazae41%2Fphobos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazae41%2Fphobos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazae41%2Fphobos/lists"}