Skip to content

watch:test triggers infinitely because its watching generated files #1215

@kevinramharak

Description

@kevinramharak

When running npm run watch:test I notice the following output:

> @vscode/[email protected] watch:test
> npm run test -- --watch


> @vscode/[email protected] test
> mocha --watch



  collect
    ✔ should catch all files (1521ms)


  1 passing (2s)



  collect
    ✔ should catch all files (1430ms)


  1 passing (1s)



  collect
    ✔ should catch all files (1484ms)


  1 passing (1s)



  collect
⚠ [mocha] cleaning up, please wait...

This is caused because of the following glob in package.json

"mocha": {
	"require": [
		"ts-node/register"
	],
	"watch-files": "src/**",
	"spec": "src/test/**/*.ts"
}

The tests will generate files and folders in src/test/fixtures/ causing an infinite trigger.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions