-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(server): async user callback for server.listen #2218
Conversation
Codecov Report
@@ Coverage Diff @@
## next #2218 +/- ##
=======================================
Coverage 93.93% 93.93%
=======================================
Files 36 36
Lines 1302 1302
Branches 367 367
=======================================
Hits 1223 1223
Misses 70 70
Partials 9 9
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add tests 👍
test/server/Server.test.js
Outdated
const compiler = webpack(config); | ||
const server = new Server( | ||
compiler, | ||
Object.assign( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
{
onListening: () => {
callOrder.push('onListening');
},
...baseDevConfig
}
lib/Server.js
Outdated
@@ -748,10 +748,10 @@ class Server { | |||
// specifically so that things are done in the right order to prevent | |||
// backwards compatability issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// backwards compatability issues | |
// backwards compatibility issues |
e7d37f4
to
133c3b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @hiroppy
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
* feat(server): made user callback async, remove cli listen redundancy * test(server): added server listen method async callback tests * test(server): create options object using spread operator * chore(server): fix comment spelling
For Bugs and Features; did you add new tests?
Not yet
Motivation / Use-Case
@evilebottnawi Is this what you meant by async
userCallback
?Making the callback from
server.listen
async, along with the internally useduserCallback
. Also, removed a redundant piece of code that I left in the CLI.Breaking Changes
None
Additional Info