{"id":23274787,"url":"https://github.com/alveflo/ts-unit","last_synced_at":"2026-02-04T05:04:42.124Z","repository":{"id":33282815,"uuid":"153584887","full_name":"alveflo/ts-unit","owner":"alveflo","description":"typescript testing framework for the c# dudes","archived":false,"fork":false,"pushed_at":"2022-02-11T00:35:02.000Z","size":50,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-15T16:09:58.650Z","etag":null,"topics":["chai","nunit","test","ts-node","ts-unit","typescript"],"latest_commit_sha":null,"homepage":null,"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/alveflo.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":"2018-10-18T07:52:54.000Z","updated_at":"2019-08-20T08:33:30.000Z","dependencies_parsed_at":"2022-08-07T20:30:16.508Z","dependency_job_id":null,"html_url":"https://github.com/alveflo/ts-unit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alveflo%2Fts-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alveflo%2Fts-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alveflo%2Fts-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alveflo%2Fts-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alveflo","download_url":"https://codeload.github.com/alveflo/ts-unit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494877,"owners_count":18235047,"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":["chai","nunit","test","ts-node","ts-unit","typescript"],"created_at":"2024-12-19T20:16:06.325Z","updated_at":"2026-02-04T05:04:37.103Z","avatar_url":"https://github.com/alveflo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cargotest\nAn experimental, yet functional, chai testing framework to encourage a more NUnit-ish approach to testing in typescript.\n\n## Install\n```\n$ npm install -D cargotest\n```\n### Global runner\n```\n$ npm install -g cargotest\n```\n\n## Setup\n`experimentalDecorators` and `emitDecoratorMetadata` needs to be set to true.\n\n## Usage\n### Runner\nThe runner is used either by invoking the cli application (`$ cargo`) and the runner will run all tests in `./tests` folder (if `--path` is not provided to cargo cli application).\n\n### Test script setup\nPackage.json\n```json\n\"scripts\": {\n    \"test\": \"./node_modules/.bin/cargo\"\n}\n```\n\n### Code usage\nCargotest currently supports `Test` and `TestCase` decorators, as shown below. The decorators is only used to evaluate the corresponding function and that's it. For assertions, use chai.\n```typescript\nimport { assert } from \"chai\";\nclass TestClass {\n    @Test\n    public When_something_Then_something() {\n        let foo = new Foo();\n\n        assert.equal(foo.Bar(), \"Bar\");\n    }\n\n    @Testcase(\"Darth\", \"Vader\")\n    @Testcase(\"Obi wan\", \"Kenobi\")\n    public When_something_Then_something_else(firstName: string, lastName: string) {\n        let bar = new Bar();\n\n        assert.equal(bar.GetLastName(firstName), lastName);\n    }\n}\n```\n\n# License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falveflo%2Fts-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falveflo%2Fts-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falveflo%2Fts-unit/lists"}