{"id":16129556,"url":"https://github.com/akosyakov/ts-mocha-debugging","last_synced_at":"2025-03-18T14:30:44.105Z","repository":{"id":150990815,"uuid":"163738519","full_name":"akosyakov/ts-mocha-debugging","owner":"akosyakov","description":"Simple TypeScript setup to debug Mocha tests from VS Code","archived":false,"fork":false,"pushed_at":"2019-01-06T10:25:15.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T10:03:30.561Z","etag":null,"topics":["gitpod","mocha","ts-node","typescript","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akosyakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-01T13:25:24.000Z","updated_at":"2022-06-24T07:10:39.000Z","dependencies_parsed_at":"2023-04-19T23:26:55.591Z","dependency_job_id":null,"html_url":"https://github.com/akosyakov/ts-mocha-debugging","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"c0d847d1dea84f07a773f0aa4d6b72c75b1fd5ed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosyakov%2Fts-mocha-debugging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosyakov%2Fts-mocha-debugging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosyakov%2Fts-mocha-debugging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosyakov%2Fts-mocha-debugging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akosyakov","download_url":"https://codeload.github.com/akosyakov/ts-mocha-debugging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933378,"owners_count":20370989,"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":["gitpod","mocha","ts-node","typescript","vscode"],"created_at":"2024-10-09T22:11:22.317Z","updated_at":"2025-03-18T14:30:44.099Z","avatar_url":"https://github.com/akosyakov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple TypeScript setup to debug Mocha tests from VS Code\n\nA TypeScript setup to run and debug Mocha tests without extra configuration and runtime overhead of tools like ts-node.\n\n\u003cimg alt=\"Debugging TypeScript Mocha Tests\" src=\"https://user-images.githubusercontent.com/3082655/50573829-99274f80-0ddb-11e9-9c70-b88520888678.gif\" height=\"640\" /\u003e\n\nYou can try it out with VS Code or in your browser with Gitpod (requires OAuth with GitHub):\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/akosyakov/ts-mocha-debugging)\n\n## Installing\n\nInstall `typescript` and `mocha` from cli with:\n\n    yarn\n\n*Note: Gitpod auto installs dependencies on the workspace initialization, see [.gitpod.yml](.gitpod.yml)*\n\n## Building\n\nCode and tests can be compiled from cli with:\n\n    yarn watch\n\n*Note: Gitpod auto starts watching on each workspace startup, see [.gitpod.yml](.gitpod.yml)*\n\n## Running tests\n\nAll tests can be run from cli with:\n\n    yarn test\n\n## Debugging tests\n\nAn individual ts spec file can be debugged in VS Code or Gitpod with `Mocha Tests` configuration:\n- select a ts spec file, i.e. [repo.spec.ts](src/repo.spec.ts);\n- add a breakpoint;\n- press `F5` to run tests in the selected file.\n\n[tsc is configured](tsconfig.json) to compile to `lib` folder and produce source maps.\n[Mocha Test](.vscode/launch.json) configuration looks up source maps from the `lib` folder via `outFiles` property,\nand executes tests from all files matching `**/${fileBasenameNoExtension}.js`,\ne.g. for `src/repo.spec.ts` files matching `**/repo.spec.js` are included.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakosyakov%2Fts-mocha-debugging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakosyakov%2Fts-mocha-debugging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakosyakov%2Fts-mocha-debugging/lists"}