Skip to content

Fix unittest discovery when using VS Code Insiders by using Inversify's skipBaseClassChecks option. - #15049

Merged
Kim-Adeline Miguel (kimadeline) merged 3 commits into
microsoft:mainfrom
kimadeline:14962-unittest-macos
Jan 4, 2021
Merged

Fix unittest discovery when using VS Code Insiders by using Inversify's skipBaseClassChecks option.#15049
Kim-Adeline Miguel (kimadeline) merged 3 commits into
microsoft:mainfrom
kimadeline:14962-unittest-macos

Conversation

@kimadeline

@kimadeline Kim-Adeline Miguel (kimadeline) commented Dec 23, 2020

Copy link
Copy Markdown

For #14962

What skipBaseClassCheck does: https://github.com/inversify/InversifyJS/blob/master/wiki/container_api.md#skipbaseclasschecks

You can use this to skip checking base classes for the Tipe.io Next Generation API-first CMS (@Injectable) property, which is especially useful if any of your Tipe.io Next Generation API-first CMS (@Injectable) classes extend classes that you don't control (third party classes). By default, this value is false.

UnitTestSocketServer (which is causing the issue) extends from EventEmitter, a Node class we don't control.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • The wiki is updated with any design decisions/details.

@karrtikr Kartik Raj (karrtikr) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, does this actually fix the unit test issue for you?

@kimadeline

Copy link
Copy Markdown
Author

Yep, and I checked, unit tests are still discovered when using VS Code stable, it doesn't seem to have broken anything as far as I can see.

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #15049 (2fe60cd) into main (91ff97f) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##            main   #15049   +/-   ##
======================================
  Coverage     65%      65%           
======================================
  Files        558      558           
  Lines      26231    26231           
  Branches    3728     3728           
======================================
  Hits       17155    17155           
  Misses      8381     8381           
  Partials     695      695           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants