refactor: merge test-utils package into core (#3200)

* refactor: merge test-utils package into core

Consolidate the standalone @qwen-code/qwen-code-test-utils package
into packages/core/src/test-utils/, eliminating the need for a
separate package that only provided createTmpDir, cleanupTmpDir,
and FileSystemStructure type.

Changes:
- Move file-system-test-helpers.ts into core/src/test-utils/
- Re-export from core's test-utils index
- Update 3 core test files to use relative imports
- Update cli useAtCompletion test to import from @qwen-code/qwen-code-core
- Remove test-utils devDependency from core and cli package.json
- Delete packages/test-utils/ directory

All affected tests pass (fileSearch, crawler, ignore, useAtCompletion).

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix: remove deleted test-utils from build order

The test-utils package was merged into core but the build script still
tried to build it separately, causing CI failures.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
pomelo 2026-04-13 17:11:03 +08:00 committed by GitHub
parent 54dd9252e0
commit 338c0b1e9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 20 additions and 83 deletions

View file

@ -9,10 +9,8 @@
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
import { renderHook, waitFor, act } from '@testing-library/react';
import { useAtCompletion } from './useAtCompletion.js';
import type { Config, FileSearch } from '@qwen-code/qwen-code-core';
import { FileSearchFactory } from '@qwen-code/qwen-code-core';
import type { FileSystemStructure } from '@qwen-code/qwen-code-test-utils';
import { createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-test-utils';
import type { Config, FileSearch , FileSystemStructure } from '@qwen-code/qwen-code-core';
import { FileSearchFactory , createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-core';
import { useState } from 'react';
import type { Suggestion } from '../components/SuggestionsDisplay.js';