summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
authorjoshualitt <[email protected]>2025-08-14 10:35:34 -0700
committerGitHub <[email protected]>2025-08-14 17:35:34 +0000
commitef54f720de0ed9e94677504b21d437a79fec89fd (patch)
tree4de9304e9e8205ea80ff5333928cc057113085ea /packages/cli/src
parent4973e7e1e04004547021986a0e2dc5eeb4a8bf9d (diff)
bug(cli): Exclude only specific tests. (#6244)
Diffstat (limited to 'packages/cli/src')
-rw-r--r--packages/cli/src/test-utils/customMatchers.ts10
-rw-r--r--packages/cli/src/test-utils/mockCommandContext.ts3
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/cli/src/test-utils/customMatchers.ts b/packages/cli/src/test-utils/customMatchers.ts
index c0b4df6b..26eac07b 100644
--- a/packages/cli/src/test-utils/customMatchers.ts
+++ b/packages/cli/src/test-utils/customMatchers.ts
@@ -12,15 +12,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { expect } from 'vitest';
+import { Assertion, expect } from 'vitest';
import type { TextBuffer } from '../ui/components/shared/text-buffer.js';
// RegExp to detect invalid characters: backspace, and ANSI escape codes
// eslint-disable-next-line no-control-regex
const invalidCharsRegex = /[\b\x1b]/;
-function toHaveOnlyValidCharacters(this: vi.Assertion, buffer: TextBuffer) {
- const { isNot } = this;
+function toHaveOnlyValidCharacters(this: Assertion, buffer: TextBuffer) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const { isNot } = this as any;
let pass = true;
const invalidLines: Array<{ line: number; content: string }> = [];
@@ -50,7 +51,8 @@ function toHaveOnlyValidCharacters(this: vi.Assertion, buffer: TextBuffer) {
expect.extend({
toHaveOnlyValidCharacters,
-});
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+} as any);
// Extend Vitest's `expect` interface with the custom matcher's type definition.
declare module 'vitest' {
diff --git a/packages/cli/src/test-utils/mockCommandContext.ts b/packages/cli/src/test-utils/mockCommandContext.ts
index 4137dbff..12b8d096 100644
--- a/packages/cli/src/test-utils/mockCommandContext.ts
+++ b/packages/cli/src/test-utils/mockCommandContext.ts
@@ -54,7 +54,8 @@ export const createMockCommandContext = (
loadHistory: vi.fn(),
toggleCorgiMode: vi.fn(),
toggleVimEnabled: vi.fn(),
- },
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ } as any,
session: {
sessionShellAllowlist: new Set<string>(),
stats: {