{"id":23120487,"url":"https://github.com/typescriptlibs/tst","last_synced_at":"2025-06-19T05:44:06.596Z","repository":{"id":63824624,"uuid":"569601225","full_name":"typescriptlibs/tst","owner":"typescriptlibs","description":"TypeScript Tester","archived":false,"fork":false,"pushed_at":"2023-08-05T20:42:41.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-12T02:03:22.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://typescriptlibs.org/tst/","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/typescriptlibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2022-11-23T07:44:09.000Z","updated_at":"2022-12-06T21:29:49.000Z","dependencies_parsed_at":"2023-01-26T09:45:10.378Z","dependency_job_id":null,"html_url":"https://github.com/typescriptlibs/tst","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Ftst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Ftst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Ftst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Ftst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typescriptlibs","download_url":"https://codeload.github.com/typescriptlibs/tst/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112767,"owners_count":20885606,"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":[],"created_at":"2024-12-17T06:11:10.413Z","updated_at":"2025-04-04T03:15:36.481Z","avatar_url":"https://github.com/typescriptlibs.png","language":"TypeScript","readme":"TST: TypeScript Tester\n======================\n\nSimple testing tool to run and test TypeScript code in combination with\nassertion libraries.\n\n\n\nCommand Line Arguments\n----------------------\n\n* \\[options] : Optional flags explained in the section below.\n\n* \\[source]  : Source folder with TypeScript tests.\n\n\n\nCommand Line Options\n--------------------\n\n* --help, -h    : Prints this help text.\n\n* --only [path] : Runs a single test in [source].\n\n* --reset       : Compiles into an empty TypeScript target.\n\n* --verbose     : Prints test details.\n\n* --version, -v : Prints the version string.\n\n\n\nExamples\n--------\n\nInstall the testing tool.\n```sh\n$ npm install @typescriptlibs/tst\n```\n\nImport the default test function in the following pattern. If you like to use a\ncustom assert library, you can ignore the assert argument.\n```ts\nimport test from '@typescriptlibs/tst';\n\ntest('Test the answer to the ultimate question.', (assert: test.Assert) =\u003e {\n    assert.strictEqual(\n        42,\n        Math.cbrt(74088),\n        'The answer to the ultimate question should be the cube root of 74088.'\n    );\n});\n\ntest('Test the timeout function.', async (assert: test.Assert) =\u003e {\n    const time = Date.now();\n\n    await new Promise((resolve) =\u003e setTimeout(resolve, 100));\n\n    const delta = Date.now() - time;\n\n    assert.ok(\n        delta \u003e 100,\n        `The timeout should fire after 100 milliseconds. (${delta})`\n    );\n});\n```\n\nCompile, load and run assertion tests in the \"tests\" folder.\n```sh\n$ npx tst tests/\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescriptlibs%2Ftst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypescriptlibs%2Ftst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescriptlibs%2Ftst/lists"}