@@ -5,16 +5,16 @@ import { isDashScopeE2EReady, parseStdoutJson, runCli, cliPackageRoot } from "./
55/**
66 * Fine-tune E2E.
77 *
8- * The offline suite exercises command discovery, help text, and the
9- * `--dry-run` structured-output path (arg parsing + body construction) with no
10- * network dependency, so it passes whether or not an API key is configured.
11- * The remote list test is gated by isDashScopeE2EReady() — it is skipped when
12- * no DashScope credential is present, and when it does run it tolerates both
13- * empty accounts and auth/permission failures (see the test comment). The
14- * suite is therefore green with no key, a valid key, or an invalid key .
8+ * The suite exercises command discovery, help text, and the `--dry-run`
9+ * structured-output path (arg parsing + body construction) with no network
10+ * dependency. Because `ensureApiKey` runs before every command (see main.ts),
11+ * these cases are gated by isDashScopeE2EReady() — they are skipped when no
12+ * DashScope credential is present (e.g. on CI) and run offline when one is.
13+ * The remote list test is also gated and tolerates both empty accounts and
14+ * auth/permission failures (see the test comment) .
1515 */
1616
17- describe ( "e2e: finetune (offline)" , ( ) => {
17+ describe . skipIf ( ! isDashScopeE2EReady ( ) ) ( "e2e: finetune (offline)" , ( ) => {
1818 test ( "finetune 列出子命令" , async ( ) => {
1919 const { stdout, stderr, exitCode } = await runCli ( [ "finetune" ] ) ;
2020 expect ( exitCode , stderr ) . toBe ( 0 ) ;
0 commit comments