Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-3475: Unit testing improvements #559

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

Jammjammjamm
Copy link
Collaborator

@Jammjammjamm Jammjammjamm commented Nov 18, 2024

This branch factors out common unit testing behaviors. For a demonstration of a test kit using this functionality, see inferno-framework/subscriptions-test-kit#13

The template has also been updated to use these shared behaviors. If you generate a new test kit, comment out the inferno_core requirement in the gemspec, and point at this inferno_core branch in the Gemfile, the unit tests should pass in the created test kit.

@Jammjammjamm Jammjammjamm self-assigned this Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.05%. Comparing base (050f4e8) to head (8d83a85).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/inferno/dsl/resume_test_route.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
- Coverage   84.05%   84.05%   -0.01%     
==========================================
  Files         262      262              
  Lines       11409    11415       +6     
  Branches     1255     1256       +1     
==========================================
+ Hits         9590     9595       +5     
- Misses       1809     1810       +1     
  Partials       10       10              
Flag Coverage Δ
backend 92.17% <85.71%> (-0.02%) ⬇️
frontend 79.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@Jammjammjamm Jammjammjamm marked this pull request as ready for review November 19, 2024 13:34
Copy link
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

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

looks good to me. How much do existing spec tests need to change to work with this? Should existing tests override this added context, or will they need to be updated to align?

spec/runnable_context.rb Show resolved Hide resolved
Copy link
Contributor

@Shaumik-Ashraf Shaumik-Ashraf left a comment

Choose a reason for hiding this comment

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

Tested this inferno_core and a test kit created by inferno new and both worked.

@Jammjammjamm
Copy link
Collaborator Author

How much do existing spec tests need to change to work with this? Should existing tests override this added context, or will they need to be updated to align?

It shouldn't interfere with existing specs, as demonstrated in this PR: inferno-framework/subscriptions-test-kit#13

@Jammjammjamm Jammjammjamm force-pushed the fi-3475-unit-testing-improvements branch from 4196492 to 8d83a85 Compare November 21, 2024 13:05
@Jammjammjamm Jammjammjamm merged commit 88bc16c into main Nov 21, 2024
9 of 10 checks passed
@Jammjammjamm Jammjammjamm deleted the fi-3475-unit-testing-improvements branch November 21, 2024 13:11
@Shaumik-Ashraf Shaumik-Ashraf mentioned this pull request Nov 25, 2024
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.

3 participants