|
| 1 | +import { execSync } from 'node:child_process'; |
| 2 | +import { join } from 'node:path'; |
| 3 | + |
| 4 | +describe('--help command', () => { |
| 5 | + it('prints the up to date help command', () => { |
| 6 | + const binName = process.env.SENTRY_WIZARD_E2E_TEST_BIN |
| 7 | + ? ['dist-bin', `sentry-wizard-${process.platform}-${process.arch}`] |
| 8 | + : ['dist', 'bin.js']; |
| 9 | + |
| 10 | + const binPath = join(__dirname, '..', '..', ...binName); |
| 11 | + |
| 12 | + const output = execSync(`${binPath} --help`, { |
| 13 | + stdio: 'pipe', |
| 14 | + }); |
| 15 | + |
| 16 | + expect(output.toString()).toMatchInlineSnapshot(` |
| 17 | + "Options: |
| 18 | + --help Show help [boolean] |
| 19 | + --debug Enable verbose logging |
| 20 | + env: SENTRY_WIZARD_DEBUG [boolean] [default: false] |
| 21 | + --uninstall Revert project setup process |
| 22 | + env: SENTRY_WIZARD_UNINSTALL |
| 23 | + [boolean] [default: false] |
| 24 | + --skip-connect Skips the connection to the server |
| 25 | + env: SENTRY_WIZARD_SKIP_CONNECT |
| 26 | + [boolean] [default: false] |
| 27 | + --quiet Do not fallback to prompting user asking questions |
| 28 | + env: SENTRY_WIZARD_QUIET [boolean] [default: false] |
| 29 | + -i, --integration Choose the integration to setup |
| 30 | + env: SENTRY_WIZARD_INTEGRATION |
| 31 | + [choices: "reactNative", "flutter", "ios", "android", "cordova", "electron", |
| 32 | + "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps"] |
| 33 | + -p, --platform Choose platform(s) |
| 34 | + env: SENTRY_WIZARD_PLATFORM |
| 35 | + [array] [choices: "ios", "android"] |
| 36 | + -u, --url The url to your Sentry installation |
| 37 | + env: SENTRY_WIZARD_URL |
| 38 | + --project The Sentry project slug to use |
| 39 | + [string] [default: Select project during setup] |
| 40 | + --org The Sentry org slug to use |
| 41 | + [string] [default: Select org during setup] |
| 42 | + --saas Skip the self-hosted or SaaS URL selection process |
| 43 | + [boolean] [default: Select self-hosted or SaaS during setup] |
| 44 | + -s, --signup Redirect to signup page if not logged in |
| 45 | + [boolean] [default: false] |
| 46 | + --disable-telemetry Don't send telemetry data to Sentry |
| 47 | + [boolean] [default: false] |
| 48 | + --force-install Force install the SDK NPM package |
| 49 | + [boolean] [default: false] |
| 50 | + --ignore-git-changes Ignore git changes in the project |
| 51 | + [boolean] [default: false] |
| 52 | + --version Show version number [boolean] |
| 53 | + " |
| 54 | + `); |
| 55 | + }); |
| 56 | +}); |
0 commit comments