webpack-dev-server icon indicating copy to clipboard operation
webpack-dev-server copied to clipboard

feat(server): check that serverMode implementation is correct

Open knagaitsev opened this issue 5 years ago • 2 comments

  • [ ] 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

knagaitsev avatar Jun 20 '19 16:06 knagaitsev

Codecov Report

Merging #2051 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 26211fc...cf6e74a. Read the comment docs.

codecov[bot] avatar Jun 20 '19 16:06 codecov[bot]

I think it is extra checking and should be solved using schema-util instead 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.

knagaitsev avatar Jun 25 '19 03:06 knagaitsev