The server resource was being reported as initialized before the server.listen() callback was invoked. This meant that you could have test code that relied on the server running, and awaited server initialization, but the server was not actually up and accepting connections.
Approach
During server initialization, create a promise that is only ever resolved when the server.listen() callback is invoked.
Motivation
The server resource was being reported as initialized before the server.listen() callback was invoked. This meant that you could have test code that relied on the server running, and awaited server initialization, but the server was not actually up and accepting connections.
Approach
During server initialization, create a promise that is only ever resolved when the server.listen() callback is invoked.