microsoft / microsoft/nodejstools

Support .mocharc Files

Open
#2,363 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.8k
Forks
355
PR merge metrics
No merged PRs in 30d

Description

Feature Request: Support .mocharc files for discovering and running tests

Description: Mocha supports running tests directly from typescript files with the ts-node package. This is a really neat feature for developers since it eliminates the need to transpile tests before running the tests. However, the VS test adapter explicitly reads js files and passes those to mocha to determine what tests are available.

It would be great if the test adapter could read any mocharc file to determine what files to load and how to load them so that mocha can return the tests that can be executed.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the VS test adapter code that explicitly reads JavaScript files and the path used to invoke Mocha. Check how Mocha configuration is currently discovered, then define completion as supporting .mocharc files so configured test and loader options are passed through and the expected tests are returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, node.js, typescript
Domain
developer-experience, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.