FoalTS / foal

Full-featured Node.js framework 🚀
https://foalts.org/
MIT License
1.9k stars 142 forks source link

[Cleanup] Move http request read from `@JWT` and `@UseSessions` into separate functions #1107

Closed LoicPoullain closed 2 years ago

LoicPoullain commented 2 years ago

Issue

@JWT and @UseSessions are big functions with a lot of tests. It is hard to add new features to them without providing a lot of work.

Solution and steps

Checklist

codecov-commenter commented 2 years ago

Codecov Report

Merging #1107 (b09082a) into v3-0-0 (fffbb91) will decrease coverage by 0.05%. The diff coverage is 96.96%.

@@            Coverage Diff             @@
##           v3-0-0    #1107      +/-   ##
==========================================
- Coverage   98.87%   98.82%   -0.06%     
==========================================
  Files          84       85       +1     
  Lines        1693     1705      +12     
  Branches      405      408       +3     
==========================================
+ Hits         1674     1685      +11     
- Misses         19       20       +1     
Impacted Files Coverage Δ
packages/core/src/sessions/use-sessions.hook.ts 98.79% <90.00%> (-1.21%) :arrow_down:
...e/src/sessions/http/get-session-id-from-request.ts 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 fffbb91...b09082a. Read the comment docs.