From 355016a3eb5cb1e8cc93f9ed8d11b9ba023d89cc Mon Sep 17 00:00:00 2001 From: mizdra Date: Tue, 5 May 2026 16:15:11 +0900 Subject: [PATCH 1/2] test(ts-plugin): flatten e2e-test directory by removing feature/ and regression/ Move all test files from feature/ and regression/ subdirectories into e2e-test/ root. Adjust import paths accordingly. File names are preserved in this commit; renames will follow in a subsequent commit. --- .../ts-plugin/e2e-test/{feature => }/code-fix.test.ts | 8 ++++---- .../ts-plugin/e2e-test/{feature => }/completion.test.ts | 6 +++--- .../e2e-test/{feature => }/find-all-references.test.ts | 6 +++--- .../e2e-test/{feature => }/go-to-definition.test.ts | 6 +++--- .../e2e-test/{regression => }/pure-css-file.test.ts | 6 +++--- .../ts-plugin/e2e-test/{feature => }/refactor.test.ts | 8 ++++---- .../ts-plugin/e2e-test/{feature => }/rename-file.test.ts | 6 +++--- .../e2e-test/{feature => }/rename-symbol.test.ts | 6 +++--- .../e2e-test/{feature => }/semantic-diagnostics.test.ts | 6 +++--- .../e2e-test/{feature => }/syntactic-diagnostics.test.ts | 6 +++--- 10 files changed, 32 insertions(+), 32 deletions(-) rename packages/ts-plugin/e2e-test/{feature => }/code-fix.test.ts (97%) rename packages/ts-plugin/e2e-test/{feature => }/completion.test.ts (97%) rename packages/ts-plugin/e2e-test/{feature => }/find-all-references.test.ts (98%) rename packages/ts-plugin/e2e-test/{feature => }/go-to-definition.test.ts (98%) rename packages/ts-plugin/e2e-test/{regression => }/pure-css-file.test.ts (80%) rename packages/ts-plugin/e2e-test/{feature => }/refactor.test.ts (90%) rename packages/ts-plugin/e2e-test/{feature => }/rename-file.test.ts (92%) rename packages/ts-plugin/e2e-test/{feature => }/rename-symbol.test.ts (98%) rename packages/ts-plugin/e2e-test/{feature => }/semantic-diagnostics.test.ts (92%) rename packages/ts-plugin/e2e-test/{feature => }/syntactic-diagnostics.test.ts (83%) diff --git a/packages/ts-plugin/e2e-test/feature/code-fix.test.ts b/packages/ts-plugin/e2e-test/code-fix.test.ts similarity index 97% rename from packages/ts-plugin/e2e-test/feature/code-fix.test.ts rename to packages/ts-plugin/e2e-test/code-fix.test.ts index 709dbbb2..b0df7b86 100644 --- a/packages/ts-plugin/e2e-test/feature/code-fix.test.ts +++ b/packages/ts-plugin/e2e-test/code-fix.test.ts @@ -4,10 +4,10 @@ import { describe, expect, test } from 'vite-plus/test'; import { CANNOT_FIND_NAME_ERROR_CODE, PROPERTY_DOES_NOT_EXIST_ERROR_CODES, -} from '../../src/language-service/feature/code-fix.js'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { formatPath, launchTsserver, normalizeCodeFixActions } from '../test-util/tsserver.js'; +} from '../src/language-service/feature/code-fix.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { formatPath, launchTsserver, normalizeCodeFixActions } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/completion.test.ts b/packages/ts-plugin/e2e-test/completion.test.ts similarity index 97% rename from packages/ts-plugin/e2e-test/feature/completion.test.ts rename to packages/ts-plugin/e2e-test/completion.test.ts index c0ed3e3a..ecf1f757 100644 --- a/packages/ts-plugin/e2e-test/feature/completion.test.ts +++ b/packages/ts-plugin/e2e-test/completion.test.ts @@ -2,9 +2,9 @@ import { join } from '@css-modules-kit/core'; import dedent from 'dedent'; import ts from 'typescript'; import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { launchTsserver, normalizeCompletionDetails, normalizeCompletionEntry } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { launchTsserver, normalizeCompletionDetails, normalizeCompletionEntry } from './test-util/tsserver.js'; const reactDtsPath = join(require.resolve('@types/react/package.json'), '../index.d.ts'); const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/find-all-references.test.ts b/packages/ts-plugin/e2e-test/find-all-references.test.ts similarity index 98% rename from packages/ts-plugin/e2e-test/feature/find-all-references.test.ts rename to packages/ts-plugin/e2e-test/find-all-references.test.ts index 05e233ae..4b372186 100644 --- a/packages/ts-plugin/e2e-test/feature/find-all-references.test.ts +++ b/packages/ts-plugin/e2e-test/find-all-references.test.ts @@ -1,8 +1,8 @@ import dedent from 'dedent'; import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { formatPath, launchTsserver, normalizeRefItems } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { formatPath, launchTsserver, normalizeRefItems } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/go-to-definition.test.ts b/packages/ts-plugin/e2e-test/go-to-definition.test.ts similarity index 98% rename from packages/ts-plugin/e2e-test/feature/go-to-definition.test.ts rename to packages/ts-plugin/e2e-test/go-to-definition.test.ts index 294413aa..7add69ce 100644 --- a/packages/ts-plugin/e2e-test/feature/go-to-definition.test.ts +++ b/packages/ts-plugin/e2e-test/go-to-definition.test.ts @@ -1,8 +1,8 @@ import dedent from 'dedent'; import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { formatPath, launchTsserver, normalizeDefinitions } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { formatPath, launchTsserver, normalizeDefinitions } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/regression/pure-css-file.test.ts b/packages/ts-plugin/e2e-test/pure-css-file.test.ts similarity index 80% rename from packages/ts-plugin/e2e-test/regression/pure-css-file.test.ts rename to packages/ts-plugin/e2e-test/pure-css-file.test.ts index 63b88ee6..1656f5e7 100644 --- a/packages/ts-plugin/e2e-test/regression/pure-css-file.test.ts +++ b/packages/ts-plugin/e2e-test/pure-css-file.test.ts @@ -1,7 +1,7 @@ import { expect, test } from 'vite-plus/test'; -import { buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { launchTsserver } from '../test-util/tsserver.js'; +import { buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { launchTsserver } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/refactor.test.ts b/packages/ts-plugin/e2e-test/refactor.test.ts similarity index 90% rename from packages/ts-plugin/e2e-test/feature/refactor.test.ts rename to packages/ts-plugin/e2e-test/refactor.test.ts index 79a9f514..fd508fc7 100644 --- a/packages/ts-plugin/e2e-test/feature/refactor.test.ts +++ b/packages/ts-plugin/e2e-test/refactor.test.ts @@ -1,8 +1,8 @@ import { describe, expect, test } from 'vite-plus/test'; -import { createCssModuleFileRefactor } from '../../src/language-service/feature/refactor.js'; -import { buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { launchTsserver } from '../test-util/tsserver.js'; +import { createCssModuleFileRefactor } from '../src/language-service/feature/refactor.js'; +import { buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { launchTsserver } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/rename-file.test.ts b/packages/ts-plugin/e2e-test/rename-file.test.ts similarity index 92% rename from packages/ts-plugin/e2e-test/feature/rename-file.test.ts rename to packages/ts-plugin/e2e-test/rename-file.test.ts index 468c1133..afab57b2 100644 --- a/packages/ts-plugin/e2e-test/feature/rename-file.test.ts +++ b/packages/ts-plugin/e2e-test/rename-file.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { formatPath, launchTsserver } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { formatPath, launchTsserver } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/rename-symbol.test.ts b/packages/ts-plugin/e2e-test/rename-symbol.test.ts similarity index 98% rename from packages/ts-plugin/e2e-test/feature/rename-symbol.test.ts rename to packages/ts-plugin/e2e-test/rename-symbol.test.ts index e94b2e1e..6a0cf953 100644 --- a/packages/ts-plugin/e2e-test/feature/rename-symbol.test.ts +++ b/packages/ts-plugin/e2e-test/rename-symbol.test.ts @@ -1,8 +1,8 @@ import dedent from 'dedent'; import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { formatPath, launchTsserver, normalizeSpanGroups } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { formatPath, launchTsserver, normalizeSpanGroups } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/semantic-diagnostics.test.ts b/packages/ts-plugin/e2e-test/semantic-diagnostics.test.ts similarity index 92% rename from packages/ts-plugin/e2e-test/feature/semantic-diagnostics.test.ts rename to packages/ts-plugin/e2e-test/semantic-diagnostics.test.ts index a6bfeb55..e957eae9 100644 --- a/packages/ts-plugin/e2e-test/feature/semantic-diagnostics.test.ts +++ b/packages/ts-plugin/e2e-test/semantic-diagnostics.test.ts @@ -1,8 +1,8 @@ import dedent from 'dedent'; import { describe, expect, test } from 'vite-plus/test'; -import { buildStylesImport, buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { launchTsserver } from '../test-util/tsserver.js'; +import { buildStylesImport, buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { launchTsserver } from './test-util/tsserver.js'; const tsserver = launchTsserver(); diff --git a/packages/ts-plugin/e2e-test/feature/syntactic-diagnostics.test.ts b/packages/ts-plugin/e2e-test/syntactic-diagnostics.test.ts similarity index 83% rename from packages/ts-plugin/e2e-test/feature/syntactic-diagnostics.test.ts rename to packages/ts-plugin/e2e-test/syntactic-diagnostics.test.ts index 49839399..521daa01 100644 --- a/packages/ts-plugin/e2e-test/feature/syntactic-diagnostics.test.ts +++ b/packages/ts-plugin/e2e-test/syntactic-diagnostics.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vite-plus/test'; -import { buildTSConfigJSON } from '../../src/test/builder.js'; -import { setupFixture } from '../test-util/fixture.js'; -import { launchTsserver } from '../test-util/tsserver.js'; +import { buildTSConfigJSON } from '../src/test/builder.js'; +import { setupFixture } from './test-util/fixture.js'; +import { launchTsserver } from './test-util/tsserver.js'; const tsserver = launchTsserver(); From 50e60a062c64ccee8d8791b9673264ab42cc8af1 Mon Sep 17 00:00:00 2001 From: mizdra Date: Tue, 5 May 2026 16:15:57 +0900 Subject: [PATCH 2/2] test(ts-plugin): rename non-feature e2e test files for clarity - disabled.test.ts -> enabled.test.ts: neutral framing that also fits future tests for `enabled: true` - file-operation.test.ts -> file-events.test.ts: replace vague "operation" with the actual subject (filesystem events at runtime) - invalid-syntax.test.ts -> invalid-css-syntax.test.ts: make explicit which language's syntax is meant - pure-css-file.test.ts -> non-module-css-file.test.ts: literal description of the file kind (not a `*.module.css`) instead of the ambiguous "pure CSS" --- packages/ts-plugin/e2e-test/{disabled.test.ts => enabled.test.ts} | 0 .../e2e-test/{file-operation.test.ts => file-events.test.ts} | 0 .../{invalid-syntax.test.ts => invalid-css-syntax.test.ts} | 0 .../{pure-css-file.test.ts => non-module-css-file.test.ts} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename packages/ts-plugin/e2e-test/{disabled.test.ts => enabled.test.ts} (100%) rename packages/ts-plugin/e2e-test/{file-operation.test.ts => file-events.test.ts} (100%) rename packages/ts-plugin/e2e-test/{invalid-syntax.test.ts => invalid-css-syntax.test.ts} (100%) rename packages/ts-plugin/e2e-test/{pure-css-file.test.ts => non-module-css-file.test.ts} (100%) diff --git a/packages/ts-plugin/e2e-test/disabled.test.ts b/packages/ts-plugin/e2e-test/enabled.test.ts similarity index 100% rename from packages/ts-plugin/e2e-test/disabled.test.ts rename to packages/ts-plugin/e2e-test/enabled.test.ts diff --git a/packages/ts-plugin/e2e-test/file-operation.test.ts b/packages/ts-plugin/e2e-test/file-events.test.ts similarity index 100% rename from packages/ts-plugin/e2e-test/file-operation.test.ts rename to packages/ts-plugin/e2e-test/file-events.test.ts diff --git a/packages/ts-plugin/e2e-test/invalid-syntax.test.ts b/packages/ts-plugin/e2e-test/invalid-css-syntax.test.ts similarity index 100% rename from packages/ts-plugin/e2e-test/invalid-syntax.test.ts rename to packages/ts-plugin/e2e-test/invalid-css-syntax.test.ts diff --git a/packages/ts-plugin/e2e-test/pure-css-file.test.ts b/packages/ts-plugin/e2e-test/non-module-css-file.test.ts similarity index 100% rename from packages/ts-plugin/e2e-test/pure-css-file.test.ts rename to packages/ts-plugin/e2e-test/non-module-css-file.test.ts