|
24 | 24 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
25 | 25 | // THE POSSIBILITY OF SUCH DAMAGE. |
26 | 26 |
|
27 | | -import serve from "./server.mjs"; |
| 27 | +import { serve, optionDefinitions as serverOptionDefinitions } from "./server.mjs"; |
28 | 28 | import { Builder, Capabilities, logging } from "selenium-webdriver"; |
29 | 29 | import { Options as ChromeOptions } from "selenium-webdriver/chrome.js"; |
30 | 30 | import { Options as FirefoxOptions } from "selenium-webdriver/firefox.js"; |
@@ -80,8 +80,8 @@ function sleep(ms) { |
80 | 80 | } |
81 | 81 |
|
82 | 82 | const optionDefinitions = [ |
| 83 | + ...serverOptionDefinitions, |
83 | 84 | { name: "browser", type: String, description: "Set the browser to test, choices are [safari, firefox, chrome, edge]. By default the $BROWSER env variable is used." }, |
84 | | - { name: "port", type: Number, defaultValue: 8010, description: "Set the test-server port, The default value is 8010." }, |
85 | 85 | { name: "help", alias: "h", description: "Print this help text." }, |
86 | 86 | { name: "suite", type: String, defaultOption: true, typeLabel: `{underline choices}: ${VALID_TAGS.join(", ")}`, description: "Run a specific suite by name." } |
87 | 87 | ]; |
@@ -142,7 +142,7 @@ process.once("uncaughtException", (err) => { |
142 | 142 | }); |
143 | 143 |
|
144 | 144 | const PORT = options.port; |
145 | | -const server = await serve(PORT); |
| 145 | +const server = await serve(options); |
146 | 146 |
|
147 | 147 | async function runTests() { |
148 | 148 | let success = true; |
|
0 commit comments