MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / _generateTestPortNumber

Function _generateTestPortNumber

lib/commands/test.js:127–146  ·  view source on GitHub ↗
(options, ui)

Source from the content-addressed store, hash-verified

125 },
126
127 async _generateTestPortNumber(options, ui) {
128 if (options.testPort === defaultPort && !options.port) {
129 let foundPort = await getPort({ port: options.testPort });
130
131 if (options.testPort !== foundPort) {
132 ui.writeInfoLine(`Default port ${options.testPort} is already in use. Using alternate port ${foundPort}`);
133 }
134
135 return foundPort;
136 }
137
138 let port = parseInt(options.testPort, 10);
139 if ((options.port && options.testPort !== defaultPort) || (!isNaN(parseInt(options.testPort)) && !options.port)) {
140 port = parseInt(options.testPort, 10);
141 } else if (options.port) {
142 port = parseInt(options.port, 10) + 1;
143 }
144
145 return port;
146 },
147
148 buildTestPageQueryString(options) {
149 let params = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…