diff --git a/packages/knip/test/cli-include.test.ts b/packages/knip/test/cli/cli-include.test.ts similarity index 90% rename from packages/knip/test/cli-include.test.ts rename to packages/knip/test/cli/cli-include.test.ts index 76024bb8c..efb7d5f60 100644 --- a/packages/knip/test/cli-include.test.ts +++ b/packages/knip/test/cli/cli-include.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; +import { resolve } from '../../src/util/path.js'; +import { execFactory } from '../helpers/exec.js'; const cwd = resolve('fixtures/cli'); diff --git a/packages/knip/test/cli-preprocessor.test.ts b/packages/knip/test/cli/cli-preprocessor.test.ts similarity index 92% rename from packages/knip/test/cli-preprocessor.test.ts rename to packages/knip/test/cli/cli-preprocessor.test.ts index 75c2ad9f5..2652a2261 100644 --- a/packages/knip/test/cli-preprocessor.test.ts +++ b/packages/knip/test/cli/cli-preprocessor.test.ts @@ -1,8 +1,8 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; import os from 'node:os'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; +import { resolve } from '../../src/util/path.js'; +import { execFactory } from '../helpers/exec.js'; const skipIf = typeof Bun !== 'undefined' && os.platform() === 'win32' ? test.skip : test; diff --git a/packages/knip/test/cli.test.ts b/packages/knip/test/cli/cli.test.ts similarity index 62% rename from packages/knip/test/cli.test.ts rename to packages/knip/test/cli/cli.test.ts index 6467ecf93..9df811c10 100644 --- a/packages/knip/test/cli.test.ts +++ b/packages/knip/test/cli/cli.test.ts @@ -1,10 +1,10 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { helpText } from '../src/util/cli-arguments.js'; -import { loadJSON } from '../src/util/fs.js'; -import { resolve } from '../src/util/path.js'; -import { version } from '../src/version.js'; -import { execFactory } from './helpers/exec.js'; +import { helpText } from '../../src/util/cli-arguments.js'; +import { loadJSON } from '../../src/util/fs.js'; +import { resolve } from '../../src/util/path.js'; +import { version } from '../../src/version.js'; +import { execFactory } from '../helpers/exec.js'; const cwd = resolve('fixtures/cli'); diff --git a/packages/knip/test/config/js-async.test.ts b/packages/knip/test/cli/config/js-async.test.ts similarity index 72% rename from packages/knip/test/config/js-async.test.ts rename to packages/knip/test/cli/config/js-async.test.ts index d38d0d59d..d0579ff8d 100644 --- a/packages/knip/test/config/js-async.test.ts +++ b/packages/knip/test/cli/config/js-async.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/js-async'); diff --git a/packages/knip/test/config/js-flat.test.ts b/packages/knip/test/cli/config/js-flat.test.ts similarity index 72% rename from packages/knip/test/config/js-flat.test.ts rename to packages/knip/test/cli/config/js-flat.test.ts index e57d574bc..1d733a11a 100644 --- a/packages/knip/test/config/js-flat.test.ts +++ b/packages/knip/test/cli/config/js-flat.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/js-flat'); diff --git a/packages/knip/test/config/json.test.ts b/packages/knip/test/cli/config/json.test.ts similarity index 71% rename from packages/knip/test/config/json.test.ts rename to packages/knip/test/cli/config/json.test.ts index 87ebc4706..f2008fc24 100644 --- a/packages/knip/test/config/json.test.ts +++ b/packages/knip/test/cli/config/json.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/json'); diff --git a/packages/knip/test/config/mjs-async.test.ts b/packages/knip/test/cli/config/mjs-async.test.ts similarity index 73% rename from packages/knip/test/config/mjs-async.test.ts rename to packages/knip/test/cli/config/mjs-async.test.ts index 3bba7f222..b34bd1f03 100644 --- a/packages/knip/test/config/mjs-async.test.ts +++ b/packages/knip/test/cli/config/mjs-async.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/mjs-async'); diff --git a/packages/knip/test/config/mjs-flat.test.ts b/packages/knip/test/cli/config/mjs-flat.test.ts similarity index 73% rename from packages/knip/test/config/mjs-flat.test.ts rename to packages/knip/test/cli/config/mjs-flat.test.ts index 28ca9da46..201b5a73f 100644 --- a/packages/knip/test/config/mjs-flat.test.ts +++ b/packages/knip/test/cli/config/mjs-flat.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/mjs-flat'); diff --git a/packages/knip/test/config/package-json.test.ts b/packages/knip/test/cli/config/package-json.test.ts similarity index 72% rename from packages/knip/test/config/package-json.test.ts rename to packages/knip/test/cli/config/package-json.test.ts index 86b851194..b9ec390c1 100644 --- a/packages/knip/test/config/package-json.test.ts +++ b/packages/knip/test/cli/config/package-json.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/package-json'); diff --git a/packages/knip/test/config/ts-async.test.ts b/packages/knip/test/cli/config/ts-async.test.ts similarity index 72% rename from packages/knip/test/config/ts-async.test.ts rename to packages/knip/test/cli/config/ts-async.test.ts index dddddb6e4..4ecf78547 100644 --- a/packages/knip/test/config/ts-async.test.ts +++ b/packages/knip/test/cli/config/ts-async.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/ts-async'); diff --git a/packages/knip/test/config/ts-flat.test.ts b/packages/knip/test/cli/config/ts-flat.test.ts similarity index 72% rename from packages/knip/test/config/ts-flat.test.ts rename to packages/knip/test/cli/config/ts-flat.test.ts index 4af03cc33..28f06f2ea 100644 --- a/packages/knip/test/config/ts-flat.test.ts +++ b/packages/knip/test/cli/config/ts-flat.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/ts-flat'); diff --git a/packages/knip/test/config/ts-function.test.ts b/packages/knip/test/cli/config/ts-function.test.ts similarity index 72% rename from packages/knip/test/config/ts-function.test.ts rename to packages/knip/test/cli/config/ts-function.test.ts index 2533457c3..ede13ca22 100644 --- a/packages/knip/test/config/ts-function.test.ts +++ b/packages/knip/test/cli/config/ts-function.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/ts-function'); diff --git a/packages/knip/test/config/yaml.test.ts b/packages/knip/test/cli/config/yaml.test.ts similarity index 72% rename from packages/knip/test/config/yaml.test.ts rename to packages/knip/test/cli/config/yaml.test.ts index d8eb98937..485ba6afd 100644 --- a/packages/knip/test/config/yaml.test.ts +++ b/packages/knip/test/cli/config/yaml.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../../src/util/path.js'; -import { execFactory } from '../helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/config/yaml'); diff --git a/packages/knip/test/cli-reporter-json.test.ts b/packages/knip/test/cli/reporter/cli-reporter-json.test.ts similarity index 95% rename from packages/knip/test/cli-reporter-json.test.ts rename to packages/knip/test/cli/reporter/cli-reporter-json.test.ts index 169d65607..8e0368cc6 100644 --- a/packages/knip/test/cli-reporter-json.test.ts +++ b/packages/knip/test/cli/reporter/cli-reporter-json.test.ts @@ -1,8 +1,8 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; -import { updatePos } from './helpers/index.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; +import { updatePos } from '../../helpers/index.js'; const cwd = resolve('fixtures/exports'); diff --git a/packages/knip/test/cli-reporter-json2.test.ts b/packages/knip/test/cli/reporter/cli-reporter-json2.test.ts similarity index 84% rename from packages/knip/test/cli-reporter-json2.test.ts rename to packages/knip/test/cli/reporter/cli-reporter-json2.test.ts index 8468db2fd..1f122f5b0 100644 --- a/packages/knip/test/cli-reporter-json2.test.ts +++ b/packages/knip/test/cli/reporter/cli-reporter-json2.test.ts @@ -1,8 +1,8 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; -import { updatePos } from './helpers/index.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; +import { updatePos } from '../../helpers/index.js'; const cwd = resolve('fixtures/module-resolution-non-std'); diff --git a/packages/knip/test/cli-reporter-json3.test.ts b/packages/knip/test/cli/reporter/cli-reporter-json3.test.ts similarity index 84% rename from packages/knip/test/cli-reporter-json3.test.ts rename to packages/knip/test/cli/reporter/cli-reporter-json3.test.ts index a68032d22..cf2c27adb 100644 --- a/packages/knip/test/cli-reporter-json3.test.ts +++ b/packages/knip/test/cli/reporter/cli-reporter-json3.test.ts @@ -1,8 +1,8 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; -import { updatePos } from './helpers/index.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; +import { updatePos } from '../../helpers/index.js'; const cwd = resolve('fixtures/enum-members'); diff --git a/packages/knip/test/cli-reporter-markdown.test.ts b/packages/knip/test/cli/reporter/cli-reporter-markdown.test.ts similarity index 87% rename from packages/knip/test/cli-reporter-markdown.test.ts rename to packages/knip/test/cli/reporter/cli-reporter-markdown.test.ts index 2ffad78da..ecd26a0c6 100644 --- a/packages/knip/test/cli-reporter-markdown.test.ts +++ b/packages/knip/test/cli/reporter/cli-reporter-markdown.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/module-resolution-non-std'); diff --git a/packages/knip/test/cli-reporter.test.ts b/packages/knip/test/cli/reporter/cli-reporter.test.ts similarity index 86% rename from packages/knip/test/cli-reporter.test.ts rename to packages/knip/test/cli/reporter/cli-reporter.test.ts index 88613940a..9491dd009 100644 --- a/packages/knip/test/cli-reporter.test.ts +++ b/packages/knip/test/cli/reporter/cli-reporter.test.ts @@ -1,7 +1,7 @@ import { test } from 'bun:test'; import assert from 'node:assert/strict'; -import { resolve } from '../src/util/path.js'; -import { execFactory } from './helpers/exec.js'; +import { resolve } from '../../../src/util/path.js'; +import { execFactory } from '../../helpers/exec.js'; const cwd = resolve('fixtures/cli-reporter');