{"id":16186946,"url":"https://github.com/robloach/wren-assert","last_synced_at":"2026-01-20T11:32:18.030Z","repository":{"id":51206404,"uuid":"305212762","full_name":"RobLoach/wren-assert","owner":"RobLoach","description":"Minimalistic assertion library for unit testing in Wren.","archived":false,"fork":false,"pushed_at":"2021-06-10T21:01:33.000Z","size":22,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T18:02:09.209Z","etag":null,"topics":["wren","wren-language"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/RobLoach.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":"2020-10-18T23:03:28.000Z","updated_at":"2024-08-20T03:15:34.000Z","dependencies_parsed_at":"2022-09-23T00:12:03.913Z","dependency_job_id":null,"html_url":"https://github.com/RobLoach/wren-assert","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/RobLoach/wren-assert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fwren-assert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fwren-assert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fwren-assert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fwren-assert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobLoach","download_url":"https://codeload.github.com/RobLoach/wren-assert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fwren-assert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28602456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T10:46:13.255Z","status":"ssl_error","status_checked_at":"2026-01-20T10:42:51.865Z","response_time":117,"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":["wren","wren-language"],"created_at":"2024-10-10T07:19:54.152Z","updated_at":"2026-01-20T11:32:18.013Z","avatar_url":"https://github.com/RobLoach.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wren-assert\n\nMinimalistic assertion library for unit testing in [Wren](https://wren.io).\n\n## Installation\n\nCopy [`Assert.wren`](Assert.wren) and [`LICENSE`](LICENSE) to your project.\n\n## Usage\n\nThe `Assert` class is inspired by [Node.js's `assert` module](https://nodejs.org/api/assert.html), so the methods are similar. When an assert fails, it will issue a [`Fiber.abort()`](https://wren.io/modules/core/fiber.html#fiber.abort(message)).\n\n### Example\n\n``` js\nimport \"./Assert\" for Assert\n\nAssert.equal(5, 5)\nAssert.equal(5, 5, \"Expected 5 to equal 5\")\nAssert[5, 5]\nAssert[5, 5, \"Expected 5 to equal 5\"]\n\nAssert.notEqual(5, 10)\nAssert.notEqual(5, 10, \"Expected 5 to not equal 10\")\n\nAssert.ok(true)\nAssert.ok(true, \"True should be truthy\")\nAssert[true]\n\nAssert.notOk(false)\nAssert.notOk(false, \"False should be falsey\")\n\nAssert.aborts(Fn.new {\n  Fiber.abort(\"This function is expected to abort.\")\n})\n\nAssert.doesNotAbort(Fn.new {\n  System.print(\"This function does not abort, as expected.\")\n})\n\nAssert.typeOf(5, Num)\nAssert.typeOf(5, Num, \"Expected the number to be a Num.\")\n\nAssert.notTypeOf(\"Hello World!\", Num)\nAssert.notTypeOf(\"Hello World!\", Num, \"Expected the String to not be a Num.\")\n\nAssert.countOf([1, 2, 3], 3)\nAssert.countOf([1, 2, 3], 3, \"Expect a list count of 3.\")\n\nAssert.deepEqual([1, 2, 3], [1, 2, 3])\nAssert.deepEqual([1, 2, 3], [1, 2, 3], \"Expected the two lists to be the same.\")\n\nAssert.exists(5)\nAssert.exists(5, \"Expected 5 to not be null\")\n\nAssert.notExists(null)\nAssert.notExists(null, \"Expected null to be null\")\n\nAssert.contains([1, 2, 3], 2)\nAssert.contains([1, 2, 3], 2, \"Expected two to be in the sequence\")\n\nAssert.disabled = true // Disables assertion checks\n```\n\n### API\n\n``` js\nAssert.equal(actual, expected, [message])\nAssert[actual, expected, [message]]\nAssert.notEqual(actual, expected, [message])\nAssert.ok(value, [message])\nAssert[value]\nAssert.notOk(value, [message])\nAssert.aborts(fn, [message])\nAssert.doesNotAbort(fn, [message])\nAssert.typeOf(object, type, [message])\nAssert.notTypeOf(object, type, [message])\nAssert.countOf(list, count, [message])\nAssert.deepEqual(actual, expected, [message])\nAssert.exists(value, [message])\nAssert.notExists(value, [message])\nAssert.contains(haystack, needle, [message])\nAssert.disabled = true // Disables assertion checks\n```\n\n## Development\n\nUse [wren-cli](https://github.com/wren-lang/wren-cli) to run the tests...\n\n```\nwren_cli tests.wren\n```\n\n## License\n\n[MIT](License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fwren-assert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobloach%2Fwren-assert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fwren-assert/lists"}