dwyl / hapi-postgres-connection

:zap: Creates a PostgreSQL Connection (Pool) available anywhere in your Hapi App
GNU General Public License v2.0
40 stars 13 forks source link

Feature/upgrade library for hapy 19 support 3 #42

Closed Hydrock closed 4 years ago

Hydrock commented 4 years ago

Upgrade library for Hapi v.19 support

codecov[bot] commented 4 years ago

Codecov Report

Merging #42 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #42   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           33        30    -3     
=========================================
- Hits            33        30    -3     
Impacted Files Coverage Ξ”
index.js 100.00% <100.00%> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update a1d6958...a4b645c. Read the comment docs.

salzhrani commented 4 years ago

Curious to know the reason for using babel? hapi v19 requires node 12 so you can use async/await natively

salzhrani commented 4 years ago

It seems the Codecov is not picking up coverage data, not sure but this might help

salzhrani commented 4 years ago

in addition to the comments, the only branches that aren't covered are catch clause for the client connection. maybe change the process.env.DATABASE_URL to an invalid one to cause the connection failure.

nelsonic commented 4 years ago

@Hydrock getting really close to the 100% coverage mark. 🌈 Probably only a couple more tests required. πŸ™

Hydrock commented 4 years ago

@salzhrani @nelsonic

Again, I slightly rewrote the plugin. Added a test for the getCon function

now I'm a little confused

Should the plug-in allow connection failure during initialization and allow repeated connection during request?

If not, then this check is absolutely useless-because in any case, there must be one connection. image

salzhrani commented 4 years ago

LGTM

nelsonic commented 4 years ago

πŸ“¦ hapi-postgres-connection@7.0.0 is now available on NPM πŸš€ Thanks again everyone! πŸŽ‰

Hydrock commented 4 years ago

@nelsonic @salzhrani thanks 🀘