Home / Function/ waitServerListen() — astro Function Reference

waitServerListen() — astro Function Reference

Architecture documentation for the waitServerListen() function in test-utils.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  0f98dbf7_3a77_7344_74c6_cb678c4a98d0["waitServerListen()"]
  ff334e41_2760_839e_fc38_ab9318c18dfc["test-utils.js"]
  0f98dbf7_3a77_7344_74c6_cb678c4a98d0 -->|defined in| ff334e41_2760_839e_fc38_ab9318c18dfc
  style 0f98dbf7_3a77_7344_74c6_cb678c4a98d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/node/test/test-utils.js lines 69–82

export function waitServerListen(server) {
	return new Promise((resolve, reject) => {
		function onListen() {
			server.off('error', onError);
			resolve();
		}
		function onError(error) {
			server.off('listening', onListen);
			reject(error);
		}
		server.once('listening', onListen);
		server.once('error', onError);
	});
}

Domain

Subdomains

Frequently Asked Questions

What does waitServerListen() do?
waitServerListen() is a function in the astro codebase, defined in packages/integrations/node/test/test-utils.js.
Where is waitServerListen() defined?
waitServerListen() is defined in packages/integrations/node/test/test-utils.js at line 69.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free