feat(server): check that serverMode implementation is correct
- [ ] This is a bugfix
- [x] This is a feature
- [ ] This is a code refactor
- [ ] This is a test update
- [ ] This is a docs update
- [ ] This is a metadata update
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
This feature gives useful error messages when the user provides an incorrect serverMode implementation.
Breaking Changes
None
Additional Info
Codecov Report
Merging #2051 into master will increase coverage by
0.04%. The diff coverage is100%.
@@ Coverage Diff @@
## master #2051 +/- ##
==========================================
+ Coverage 92.77% 92.82% +0.04%
==========================================
Files 29 29
Lines 1149 1156 +7
Branches 327 329 +2
==========================================
+ Hits 1066 1073 +7
Misses 79 79
Partials 4 4
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/utils/getSocketServerImplementation.js | 90.9% <100%> (+1.43%) |
:arrow_up: |
| lib/utils/runOpen.js | 100% <0%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 26211fc...cf6e74a. Read the comment docs.
I think it is extra checking and should be solved using
schema-utilinstead adding checks in source code, we should search way how we can integrate this in schema util
Switched to use of schema-util. I don't think it has the ability out of the box to check the parameter count of a function, but also that is not a check we really need.