diff options
author | Timmy Willison <timmywil@users.noreply.github.com> | 2024-03-29 09:13:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 09:13:46 -0400 |
commit | 91df20be6b488ac6cf4da291d7ee3aa5d6feac73 (patch) | |
tree | 56b5c4f8b96a8323e3a6ce9c02c3e84c85a9d6d5 /tests/runner/command.js | |
parent | 802642c37323d5fc05bfa4cee90a900953f9a98d (diff) | |
download | jquery-ui-91df20be6b488ac6cf4da291d7ee3aa5d6feac73.tar.gz jquery-ui-91df20be6b488ac6cf4da291d7ee3aa5d6feac73.zip |
Tests: replace grunt-contrib-qunit with jQuery test runner
- add filestash workflow
Close gh-2221
Diffstat (limited to 'tests/runner/command.js')
-rw-r--r-- | tests/runner/command.js | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/tests/runner/command.js b/tests/runner/command.js new file mode 100644 index 000000000..655024fb4 --- /dev/null +++ b/tests/runner/command.js @@ -0,0 +1,78 @@ +import yargs from "yargs/yargs"; +import { browsers } from "./browsers.js"; +import { suites } from "./suites.js"; +import { run } from "./run.js"; +import { jquery } from "./jquery.js"; + +const argv = yargs( process.argv.slice( 2 ) ) + .version( false ) + .strict() + .command( { + command: "[options]", + describe: "Run jQuery tests in a browser" + } ) + .option( "suite", { + alias: "s", + type: "array", + choices: suites, + description: + "Run tests for a specific test suite.\n" + + "Pass multiple test suites by repeating the option.\n" + + "Defaults to all suites." + } ) + .option( "jquery", { + alias: "j", + type: "array", + choices: jquery, + description: + "Run tests against a specific jQuery version.\n" + + "Pass multiple versions by repeating the option.", + default: [ "3.7.1" ] + } ) + .option( "migrate", { + type: "boolean", + description: + "Run tests with jQuery Migrate enabled.", + default: false + } ) + .option( "browser", { + alias: "b", + type: "array", + choices: browsers, + description: + "Run tests in a specific browser.\n" + + "Pass multiple browsers by repeating the option.", + default: [ "chrome" ] + } ) + .option( "headless", { + alias: "h", + type: "boolean", + description: + "Run tests in headless mode. Cannot be used with --debug.", + conflicts: [ "debug" ] + } ) + .option( "debug", { + alias: "d", + type: "boolean", + description: + "Leave the browser open for debugging. Cannot be used with --headless.", + conflicts: [ "headless" ] + } ) + .option( "retries", { + alias: "r", + type: "number", + description: "Number of times to retry failed tests." + } ) + .option( "concurrency", { + alias: "c", + type: "number", + description: "Run tests in parallel in multiple browsers. Defaults to 8." + } ) + .option( "verbose", { + alias: "v", + type: "boolean", + description: "Log additional information." + } ) + .help().argv; + +run( argv ); |