TestContainersUpdated events are not sent on project open/close

Aperta
#2,184 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

@armanio123 ci sta già lavorando.

Dal 27/6/2019.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Expected Behavior

The TestContainerDiscoverer class is responsible for notifying the TestWindow of containers where tests should be discovered. It should call the TestContainersUpdated event whenever tests could potentially have changed.

My expectation is that OnProjectLoaded and OnProjectUnloaded should send the TestContainersUpdated event.

Actual Behavior

If you would put a breakpoint you can see that the OnTestContainersChanged is called, but the if condition evaluates to false and the event isn't actually sent, meaning that tests don't get removed on project close and don't get discovered on project open.

  • NTVS Version: 1.5.10610.1 Commit Hash:529a87de2769e143655e31ea81795c42e5775ef8
  • Visual Studio Version: 16.2 preview 4
  • Node.js Version: 8.1.4
Steps to Reproduce
  1. Open a nodejs project
  2. Run build to discover tests
  3. Unload the project
  4. If the event would have been sent successfully the tests for the unloaded project should disappear

In the OnProjectUnloaded method the project is removed from knownProjects and this makes the if condition always fail, whereas in the OnProjectLoaded method the newly created project has HasRequestedContainers set to false making the if condition always fail.

Lingua principale
C#
Stelle
1.8k
Fork
355
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/nodejstools

Tutte le issue di microsoft/nodejstools

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.