From 15b40686820cb97d2dcf517ea0e255feeceef7d5 Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:45:28 +0000 Subject: [PATCH] fix(tests): update describe block to reflect correct CLI context (#12363) --- napi/oxlint2/test/__snapshots__/e2e.test.ts.snap | 14 +++++++------- napi/oxlint2/test/e2e.test.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/napi/oxlint2/test/__snapshots__/e2e.test.ts.snap b/napi/oxlint2/test/__snapshots__/e2e.test.ts.snap index a67081ada124b..e691005ab1d47 100644 --- a/napi/oxlint2/test/__snapshots__/e2e.test.ts.snap +++ b/napi/oxlint2/test/__snapshots__/e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`cli options for bundling > should lint a directory with errors 1`] = ` +exports[`oxlint2 CLI > should lint a directory with errors 1`] = ` " x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html\\eslint(no-debugger)]8;;\\: \`debugger\` statement is not allowed ,-[index.js:1:1] @@ -13,12 +13,12 @@ Found 0 warnings and 1 error. Finished in Xms on 1 file using X threads." `; -exports[`cli options for bundling > should lint a directory without errors 1`] = ` +exports[`oxlint2 CLI > should lint a directory without errors 1`] = ` "Found 0 warnings and 0 errors. Finished in Xms on 1 file using X threads." `; -exports[`cli options for bundling > should load a custom plugin 1`] = ` +exports[`oxlint2 CLI > should load a custom plugin 1`] = ` " ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html\\eslint(no-debugger)]8;;\\: \`debugger\` statement is not allowed ,-[index.js:1:1] @@ -37,7 +37,7 @@ Found 1 warning and 1 error. Finished in Xms on 1 file using X threads." `; -exports[`cli options for bundling > should load a custom plugin when configured in overrides 1`] = ` +exports[`oxlint2 CLI > should load a custom plugin when configured in overrides 1`] = ` " ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html\\eslint(no-debugger)]8;;\\: \`debugger\` statement is not allowed ,-[index.js:1:1] @@ -56,7 +56,7 @@ Found 1 warning and 1 error. Finished in Xms on 1 file using X threads." `; -exports[`cli options for bundling > should load a custom plugin with multiple files 1`] = ` +exports[`oxlint2 CLI > should load a custom plugin with multiple files 1`] = ` " ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html\\eslint(no-debugger)]8;;\\: \`debugger\` statement is not allowed ,-[files/01.js:1:1] @@ -322,7 +322,7 @@ Found 20 warnings and 20 errors. Finished in Xms on 20 files using X threads." `; -exports[`cli options for bundling > should report an error if a custom plugin cannot be loaded 1`] = ` +exports[`oxlint2 CLI > should report an error if a custom plugin cannot be loaded 1`] = ` "Failed to parse configuration file. x Failed to load external plugin: ./test_plugin @@ -330,7 +330,7 @@ exports[`cli options for bundling > should report an error if a custom plugin ca " `; -exports[`cli options for bundling > should report an error if a rule is not found within a custom plugin 1`] = ` +exports[`oxlint2 CLI > should report an error if a rule is not found within a custom plugin 1`] = ` "Failed to parse configuration file. x Rule 'unknown-rule' not found in plugin 'basic-custom-plugin' diff --git a/napi/oxlint2/test/e2e.test.ts b/napi/oxlint2/test/e2e.test.ts index 3368b210630d1..2c8e4287e6c8d 100644 --- a/napi/oxlint2/test/e2e.test.ts +++ b/napi/oxlint2/test/e2e.test.ts @@ -20,7 +20,7 @@ function normalizeOutput(output: string): string { .replace(/using \d+ threads./, 'using X threads.'); } -describe('cli options for bundling', () => { +describe('oxlint2 CLI', () => { it('should lint a directory without errors', async () => { const { stdout, exitCode } = await runOxlint( 'test/fixtures/built_in_no_errors',