{"id":17125390,"url":"https://github.com/ruby0x1/mohxa","last_synced_at":"2025-08-18T12:15:42.996Z","repository":{"id":12273672,"uuid":"14895429","full_name":"ruby0x1/mohxa","owner":"ruby0x1","description":"A BDD style test library based closely on http://visionmedia.github.io/mocha/","archived":false,"fork":false,"pushed_at":"2020-06-12T16:50:14.000Z","size":320,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T02:08:48.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haxe","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/ruby0x1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-03T14:09:52.000Z","updated_at":"2023-07-25T13:50:05.000Z","dependencies_parsed_at":"2022-08-21T02:10:41.697Z","dependency_job_id":null,"html_url":"https://github.com/ruby0x1/mohxa","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ruby0x1/mohxa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby0x1%2Fmohxa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby0x1%2Fmohxa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby0x1%2Fmohxa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby0x1%2Fmohxa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby0x1","download_url":"https://codeload.github.com/ruby0x1/mohxa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby0x1%2Fmohxa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270989607,"owners_count":24680779,"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-08-18T02:00:08.743Z","response_time":89,"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-14T18:44:48.486Z","updated_at":"2025-08-18T12:15:42.809Z","avatar_url":"https://github.com/ruby0x1.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"### mohxa is a testing library for [Haxe](http://haxe.org/)\n---\nA BDD style test library based closely on http://visionmedia.github.io/mocha/\n\n(still pronounced mocha)\n\n###Features\n---\n\n- nested test groups\n- before, after, beforeEach, afterEach per group\n- formatted logging from inside tests\n- `equal`,`notequal`,`equalfloat`,`equalint` helper\n\n**todo**    \n\n- async\n- other output formats (json etc).\n\n**note**   \nUsually -debug flag is required for Stack traces.\n\n### Install options\n\n`haxelib install mohxa`   \n`haxelib git mohxa https://github.com/underscorediscovery/mohxa.git`    \n`haxelib local mohxa /path/to/mohxa-1.1.0.zip` (from releases)   \n\n---\n\n###How does it look?\n\n```haxe\nimport structural.Stack;\n\nclass StackTest extends Mohxa {\n\n    public function new() {\n\n        super();\n\n        describe('Stack Test', function(){\n\n            log('we will create 2 different stacks');\n            log('one with ints, one with strings');\n\n            var int_stack : Stack\u003cInt\u003e;\n            var string_stack : Stack\u003cString\u003e;\n\n            before(function(){\n\n                log('creating ... ');\n\n                int_stack = new Stack\u003cInt\u003e();\n                string_stack = new Stack\u003cString\u003e();\n\n            });\n\n            it('should each start with a 0 length', function(){\n                equal(int_stack.length, 0, 'int stack');\n                equal(string_stack.length, 0, 'string stack');\n            });\n\n            ...\n\n        }); //Stack Test\n\n    } //new\n\n} //StackTest\n```\n\n### How does the output look?\n\n![passing](./screens/mohxa_passing.png)\n\n![failing](./screens/mohxa_failing.png)\n\n![many](./screens/mohxa_many.png)\n\n### mohxa.Run\n\nOften times it is convenient to split test instances into groups.\nA Run is a group of test instances, which runs the group,\nand collates the `total`, `failed` and `time` properties from the run.\n\n```haxe\n\nclass Simple extends mohxa.Mohxa {\n\n    public function new() {\n        super();\n\n        describe('simple', function() {\n            it('exists', function() {\n                equal(true, true);\n            });\n        });\n\n    } //new\n\n} //Simple\n\nstatic function main() {\n\n    var run = new mohxa.Run([ new Simple() ]);\n\n    trace('completed ${run.total} tests, ${run.failed} failures (${run.time}ms)');\n\n} //main\n\n```\n\nYou can also pass `false` to the constructor and call `run` manually.\n\n![run](./screens/mohxa_run.png)\n\n---\n\n### History\n- 1.1.0 - Added mohxa.Run, for conveniently running groups of test instances, added mohxa_no_generic\n- 1.0.2 - lots MORE code clean up, update readme, tested on other targets. somewhere tags were added...    \n- 1.0.1 - lots of code clean up, remove Dynamic use where not needed, replace with @:generic   \n- 1.0.0 - Initial release\n\n### That's it\n\n- Suggestions, issues, bugs welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby0x1%2Fmohxa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby0x1%2Fmohxa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby0x1%2Fmohxa/lists"}