mocha-sidebar icon indicating copy to clipboard operation
mocha-sidebar copied to clipboard

Cannot run mocha-sidebar with multifolder workspace setup

Open emilekberg opened this issue 6 years ago • 8 comments

Description

When i run a workspace in vscode, using shared files, server files and client files, the sidebar plugin does not detect the tests. I'm trying to run tests only for shared in this case. The sidebar plugin works fine if i open only that folder.

Steps to Reproduce

Expected Results

Tests should be displayed an run

Actual Results

No tests are detected

Settings file

		"mocha.files.glob": "src/**/*spec.ts",
		"mocha.options": {
			"compilers": "ts:ts-node/register"
		},
		"mocha.requires": [
			"ts-node/register"
		],
		"mocha.logVerbose": true,
		"mocha.showInExplorer": true

i've also tried with absolute path ,and using mocha.subdirectory pointing to the absolute path to the shared folder.

Versions

  • VScode: v1.23.1
  • Mocha SideBar: v0.19.0
  • Node Version: v10.0.0

OS version

  • [ ] Linux
  • [ ] Mac
  • [x] Windows

emilekberg avatar May 27 '18 11:05 emilekberg

I have similar issue. I have files calles XyxTests.js and I have following user settings:

"mocha.files.glob": "**/*Tests.js",

And it cannot detects tests in side bar. Please suggest if there is any resolution.

reyou avatar Jun 03 '18 01:06 reyou

We need to add support for working with workspace. This is not implemented yet

yehiyam avatar Jun 03 '18 04:06 yehiyam

@emilekberg have you tried to put the "shared" folder at top under "folders"-array in your workspace-file?

lostfields avatar Jun 18 '18 08:06 lostfields

@lostfields that actually seems to work. Makes sense in a way, thank you :) would be good in the future to make sure it can run on every workspace, since i will add tests in the other folders in the future.

emilekberg avatar Jun 18 '18 19:06 emilekberg

@emilekberg np, had the same issue when I started to use workspace as a solution-file (coming from VS). I would really like to be able to use variables like ${workspaceFolder:<foldername>} in paths as well as multiple mocha.files.glob[]

lostfields avatar Jun 19 '18 06:06 lostfields

+1 Bump. I use Test Explorer every day because I work with microservices, and not being able to use Workspaces puts this add-on in the "disabled" pile.

wraybowling avatar Feb 27 '20 19:02 wraybowling

+1 bump

cryptedx avatar May 21 '20 09:05 cryptedx

Is there any extension that handles workspaces?

benjick avatar Oct 01 '21 09:10 benjick