inversify / InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
http://inversify.io/
MIT License
11.02k stars 712 forks source link

docs: add testing for wiki #1548

Closed omermorad closed 7 months ago

omermorad commented 8 months ago

Description

This pull request introduces a new document to the InversifyJS repository, focusing on testing strategies with InversifyJS and showcasing the integration of Automock. The document provides a comprehensive guide on two primary approaches to testing: traditional unit and integration testing with InversifyJS, and a streamlined method using Automock. It includes practical examples and code snippets to demonstrate the implementation of these testing strategies.

Related Issue

N/A

Motivation and Context

The motivation behind this change is to enhance the InversifyJS documentation by providing clear and practical guidance on effective testing methodologies. This addition addresses the need for comprehensive documentation on integrating InversifyJS with modern testing tools like Automock, thereby aiding developers in writing more efficient and reliable tests.

How Has This Been Tested?

The added documentation and examples have been reviewed and tested for clarity and accuracy. The examples provided in the document have been executed and verified in a controlled development environment to ensure they accurately demonstrate the intended functionality.

Types of changes

Checklist:

omermorad commented 8 months ago

Hey @PodaruDragos,

Following up on our conversation in Discord, I've submitted a draft for "Testing" with InversifyJS, coinciding with the upcoming release of the Automock Inversify adapter 🎊 🥳

I'd appreciate your thoughts on the overall structure and approach. The examples are still a work in progress, but I'm keen to get your feedback on the general direction before finalizing them.

Thanks for your time and input :)

PodaruDragos commented 8 months ago

hey @omermorad this looks good to me, thanks for going this.

@notaphplover, @jakehamtexas @Jameskmonger could I please have your opinions on this as well ?

omermorad commented 7 months ago

hey @omermorad this looks good to me, thanks for going this.

@notaphplover, @jakehamtexas @Jameskmonger could I please have your opinions on this as well ?

Hello, any updates on this? :)

Jameskmonger commented 7 months ago

A really valuable contribution, thank you @omermorad! Apologies for the delay, I am currently recovering from COVID 😷

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (447e71f) 99.48% compared to head (5fc29df) 99.55%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1548 +/- ## ========================================== + Coverage 99.48% 99.55% +0.06% ========================================== Files 53 53 Lines 1370 1573 +203 Branches 200 209 +9 ========================================== + Hits 1363 1566 +203 Partials 7 7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

omermorad commented 7 months ago

A really valuable contribution, thank you @omermorad! Apologies for the delay, I am currently recovering from COVID 😷

Sure, my pleasure 🙏🏻 And I hope you get over this COVID quickly 💪🏻