{"id":15564080,"url":"https://github.com/dahlia/web_deno_test","last_synced_at":"2026-05-01T09:32:35.718Z","repository":{"id":51251978,"uuid":"360959065","full_name":"dahlia/web_deno_test","owner":"dahlia","description":"Run your tests on Deno and web browsers at a time","archived":false,"fork":false,"pushed_at":"2021-04-26T13:52:43.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-18T08:04:20.531Z","etag":null,"topics":["deno","deno-test","deno-tools","tests","unit-tests","web-testing"],"latest_commit_sha":null,"homepage":"https://deno.land/x/web_deno_test","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dahlia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-23T17:28:44.000Z","updated_at":"2022-09-07T16:33:22.000Z","dependencies_parsed_at":"2022-09-26T20:41:34.208Z","dependency_job_id":null,"html_url":"https://github.com/dahlia/web_deno_test","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dahlia/web_deno_test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fweb_deno_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fweb_deno_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fweb_deno_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fweb_deno_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dahlia","download_url":"https://codeload.github.com/dahlia/web_deno_test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fweb_deno_test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["deno","deno-test","deno-tools","tests","unit-tests","web-testing"],"created_at":"2024-10-02T16:36:03.542Z","updated_at":"2026-05-01T09:32:35.696Z","avatar_url":"https://github.com/dahlia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- deno-fmt-ignore-file --\u003e\n\nweb_deno_test: Run your tests on Deno and web browsers at a time\n================================================================\n\n[![Latest version][Tag badge]][Deno module]\n[![LGPL 3.0][License badge]](./LICENSE)\n[![GitHub Actions status][GitHub Actions status badge]][GitHub Actions status]\n\nThis script enables your test suite to run on Deno and web browsers at a time.\n\n[Tag badge]: https://img.shields.io/github/v/tag/dahlia/web_deno_test\n[Deno module]: https://deno.land/x/web_deno_test\n[License badge]: https://img.shields.io/github/license/dahlia/web_deno_test\n[GitHub Actions status badge]: https://github.com/dahlia/web_deno_test/actions/workflows/test.yaml/badge.svg\n[GitHub Actions status]: https://github.com/dahlia/web_deno_test/actions/workflows/test.yaml\n\n\nHow to write tests\n------------------\n\nYou need to use the `suite()` function from *mod.ts*:\n\n~~~~ typescript\nimport { assertEquals } from \"https://deno.land/std@0.92.0/testing/asserts.ts\";\nimport suite from \"https://deno.land/x/web_deno_test/mod.ts\";\n\nconst test = suite(import.meta.url);\n\ntest(\"1 plus 2 equals 3\", () =\u003e {\n  assertEquals(1 + 2, 3);\n});\n~~~~\n\n\nHow to run tests on Deno\n------------------------\n\nThe standard Deno test command works:\n\n~~~~ bash\n$ deno test\nCheck file:///.../$deno$test.ts\nrunning 1 tests\ntest 1 plus 2 equals 3 ... ok (3ms)\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (3ms)\n~~~~\n\n\nHow to run tests on web browsers\n--------------------------------\n\nThe *cli.ts* script scans test files and turns them into [Mocha]-based\ntests:\n\n~~~~ bash\n$ deno run \\\n    --unstable \\\n    --allow-read=. \\\n    --allow-write=tests/ \\\n    --allow-net \\\n    https://deno.land/x/web_deno_test/cli.ts \\\n    --output-dir tests/ \\\n    .\nCheck .../cli.ts\n~~~~\n\nNote that the script requires `--unstable` API as of Deno 1.9.\n\nThe built *index.html* should be opened through `http:`/`https:` (not `file:`)\non web browser due to security policies:\n\n~~~~ bash\n$ deno run \\\n    --allow-net \\\n    --allow-read=. \\\n    https://deno.land/std/http/file_server.ts \\\n    tests/\n~~~~\n\nThen, open \u003chttp://0.0.0.0:4507/\u003e on your web browser.  It will run your tests:\n\n![Tests ran on web browser.](https://i.imgur.com/1vcuuVC.png)\n\n\n[Mocha]: https://mochajs.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fweb_deno_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdahlia%2Fweb_deno_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fweb_deno_test/lists"}