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

chore: Added test for getRedisParams #1670

Merged
merged 1 commit into from Jun 14, 2023

Conversation

mrickard
Copy link
Member

@mrickard mrickard commented Jun 12, 2023

Description

Added tests for the different branches of getRedisParams

Related Issues

Closes #1242
Closes NEWRELIC-4440

Signed-off-by: mrickard <maurice@mauricerickard.com>
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #1670 (1a756f9) into main (2746195) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1670      +/-   ##
==========================================
+ Coverage   96.76%   96.79%   +0.02%     
==========================================
  Files         200      200              
  Lines       39148    39180      +32     
  Branches       24       24              
==========================================
+ Hits        37883    37923      +40     
+ Misses       1265     1257       -8     
Flag Coverage Δ
esm-unit-tests-14.x 47.80% <ø> (ø)
esm-unit-tests-16.x 92.11% <ø> (ø)
esm-unit-tests-18.x 92.11% <ø> (ø)
integration-tests-14.x 78.98% <ø> (-0.02%) ⬇️
integration-tests-16.x 79.06% <ø> (-0.04%) ⬇️
integration-tests-18.x 79.08% <ø> (-0.02%) ⬇️
unit-tests-14.x 91.41% <100.00%> (+0.08%) ⬆️
unit-tests-16.x 91.46% <100.00%> (+0.08%) ⬆️
unit-tests-18.x 91.44% <100.00%> (+0.08%) ⬆️
versioned-tests-14.x 75.62% <100.00%> (-0.13%) ⬇️
versioned-tests-16.x 76.95% <100.00%> (-0.12%) ⬇️
versioned-tests-18.x 76.95% <100.00%> (-0.13%) ⬇️

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

Impacted Files Coverage Δ
lib/instrumentation/@node-redis/client.js 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bizob2828 bizob2828 self-assigned this Jun 12, 2023
@mrickard mrickard marked this pull request as ready for review June 13, 2023 17:09
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

I was trying to figure out why I wrote this back when I did. but you def covered the testing paths. You took the easy route by exposing the method instead of testing via createClient, but I think that's fine. Good work 👏🏻

@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label Jun 14, 2023
@mrickard
Copy link
Member Author

I was trying to figure out why I wrote this back when I did. but you def covered the testing paths. You took the easy route by exposing the method instead of testing via createClient, but I think that's fine. Good work 👏🏻

And I ended up finding one scenario which would have thrown when it didn't have to.

@mrickard mrickard merged commit e9f8556 into newrelic:main Jun 14, 2023
21 checks passed
Node.js Engineering Board automation moved this from Needs PR Review to Done: Issues recently completed Jun 14, 2023
@github-actions github-actions bot mentioned this pull request Jun 22, 2023
@mrickard mrickard deleted the NEWRELIC-4440/redis-unit-tests branch April 29, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

Create unit tests for redis v4 edge cases
2 participants