diff --git a/.prettierrc b/.prettierrc index be55ae48..cba9b4d6 100644 --- a/.prettierrc +++ b/.prettierrc @@ -14,6 +14,15 @@ "endOfLine": "auto", "embeddedLanguageFormatting": "auto", "singleAttributePerLine": false, + "plugins": ["@ianvs/prettier-plugin-sort-imports"], + "importOrder": [ + "^(node:)", + "", + "^[.]", + "", + "", + "^[.]" + ], "overrides": [ { "files": "*.jsonc", diff --git a/package-lock.json b/package-lock.json index 19b22d50..9e479ad6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ }, "devDependencies": { "@biomejs/biome": "1.9.4", + "@ianvs/prettier-plugin-sort-imports": "^4.4.1", "@types/node": "^22.12.0", "c8": "^10.1.3", "jsonc.min": "^1.1.0", @@ -33,6 +34,122 @@ "url": "https://github.com/sponsors/wellwelwel" } }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.5.tgz", + "integrity": "sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.5", + "@babel/types": "^7.26.5", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", + "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.7.tgz", + "integrity": "sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.5", + "@babel/parser": "^7.26.7", + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", + "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.1.tgz", @@ -615,6 +732,29 @@ "node": ">=18" } }, + "node_modules/@ianvs/prettier-plugin-sort-imports": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@ianvs/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.4.1.tgz", + "integrity": "sha512-F0/Hrcfpy8WuxlQyAWJTEren/uxKhYonOGY4OyWmwRdeTvkh9mMSCxowZLjNkhwi/2ipqCgtXwwOk7tW0mWXkA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "^7.26.2", + "@babel/parser": "^7.26.2", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "semver": "^7.5.2" + }, + "peerDependencies": { + "@vue/compiler-sfc": "2.7.x || 3.x", + "prettier": "2 || 3" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -643,6 +783,21 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -653,6 +808,16 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -968,6 +1133,24 @@ "node": ">= 8" } }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1132,6 +1315,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1221,6 +1414,26 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jsonc.min": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsonc.min/-/jsonc.min-1.1.0.tgz", @@ -1343,6 +1556,13 @@ "dev": true, "license": "MIT" }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1433,6 +1653,13 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/prettier": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", diff --git a/package.json b/package.json index 3c4312ca..908a8233 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ }, "devDependencies": { "@biomejs/biome": "1.9.4", + "@ianvs/prettier-plugin-sort-imports": "^4.4.1", "@types/node": "^22.12.0", "c8": "^10.1.3", "jsonc.min": "^1.1.0", diff --git a/src/@types/poku.ts b/src/@types/poku.ts index bc7f0902..013891c5 100644 --- a/src/@types/poku.ts +++ b/src/@types/poku.ts @@ -1,8 +1,8 @@ import type { AssertionError } from 'node:assert'; import type { results } from '../configs/poku.js'; -import type { Configs as ListFilesConfigs } from './list-files.js'; import type { ProcessAssertionOptions } from './assert.js'; import type { DescribeOptions } from './describe.js'; +import type { Configs as ListFilesConfigs } from './list-files.js'; type CustomString = string & NonNullable; diff --git a/src/bin/help.ts b/src/bin/help.ts index 7f1d1bd3..fd62fcb1 100644 --- a/src/bin/help.ts +++ b/src/bin/help.ts @@ -1,5 +1,5 @@ import { format } from '../services/format.js'; -import { log, hr } from '../services/write.js'; +import { hr, log } from '../services/write.js'; const b = (text: string) => `${format(text).bold()}`; const i = (text: string) => `${format(text).italic()}`; diff --git a/src/bin/index.ts b/src/bin/index.ts index ae8f567f..39bc45b6 100644 --- a/src/bin/index.ts +++ b/src/bin/index.ts @@ -1,14 +1,13 @@ #! /usr/bin/env node -import { escapeRegExp } from '../modules/helpers/list-files.js'; -import { getArg, getPaths, hasArg, argToArray } from '../parsers/get-arg.js'; -import { states } from '../configs/poku.js'; -import { format } from '../services/format.js'; -import { kill } from '../modules/helpers/kill.js'; -import { envFile } from '../modules/helpers/env.js'; +import { GLOBAL, states, VERSION } from '../configs/poku.js'; import { poku } from '../modules/essentials/poku.js'; -import { log, hr } from '../services/write.js'; +import { envFile } from '../modules/helpers/env.js'; +import { kill } from '../modules/helpers/kill.js'; +import { escapeRegExp } from '../modules/helpers/list-files.js'; +import { argToArray, getArg, getPaths, hasArg } from '../parsers/get-arg.js'; import { getConfigs } from '../parsers/options.js'; -import { GLOBAL, VERSION } from '../configs/poku.js'; +import { format } from '../services/format.js'; +import { hr, log } from '../services/write.js'; (async () => { /* c8 ignore next 4 */ // Version is tested during build process: "../../tools/build/version.ts" diff --git a/src/bin/watch.ts b/src/bin/watch.ts index c36c4818..c425619a 100644 --- a/src/bin/watch.ts +++ b/src/bin/watch.ts @@ -1,13 +1,14 @@ -import { mapTests, normalizePath } from '../services/map-tests.js'; -import { watch, type Watcher } from '../services/watch.js'; -import { onSigint, poku } from '../modules/essentials/poku.js'; -import { log, hr } from '../services/write.js'; +import type { Watcher } from '../services/watch.js'; import process from 'node:process'; -import { format } from '../services/format.js'; +import { GLOBAL } from '../configs/poku.js'; +import { onSigint, poku } from '../modules/essentials/poku.js'; import { getArg } from '../parsers/get-arg.js'; import { availableParallelism } from '../polyfills/os.js'; -import { GLOBAL } from '../configs/poku.js'; +import { format } from '../services/format.js'; +import { mapTests, normalizePath } from '../services/map-tests.js'; import { errors } from '../services/reporters/poku.js'; +import { watch } from '../services/watch.js'; +import { hr, log } from '../services/write.js'; export const startWatch = async (dirs: string[]) => { let isRunning = false; diff --git a/src/builders/assert.ts b/src/builders/assert.ts index 28858855..f4c6c549 100644 --- a/src/builders/assert.ts +++ b/src/builders/assert.ts @@ -1,6 +1,6 @@ -import type { ProcessAssertionOptions } from '../@types/assert.js'; import type assert from 'node:assert'; import type { AssertPredicate } from 'node:assert'; +import type { ProcessAssertionOptions } from '../@types/assert.js'; import { processAssert, processAsyncAssert } from '../services/assert.js'; export const createAssert = (nodeAssert: typeof assert) => { diff --git a/src/configs/poku.ts b/src/configs/poku.ts index 29599bf7..fca8db82 100644 --- a/src/configs/poku.ts +++ b/src/configs/poku.ts @@ -1,13 +1,14 @@ -import { env, cwd } from 'node:process'; -import type { Timespan, States } from '../@types/poku.js'; import type { ConfigFile, ConfigJSONFile, Configs, Runtime, + States, + Timespan, } from '../@types/poku.js'; -import { reporter } from '../services/reporter.js'; +import { cwd, env } from 'node:process'; import { getRuntime } from '../parsers/get-runtime.js'; +import { reporter } from '../services/reporter.js'; export const states = Object.create(null) as States; diff --git a/src/modules/essentials/poku.ts b/src/modules/essentials/poku.ts index 4a1b169a..29e952f2 100644 --- a/src/modules/essentials/poku.ts +++ b/src/modules/essentials/poku.ts @@ -1,11 +1,10 @@ import type { Code } from '../../@types/code.js'; import type { Configs } from '../../@types/poku.js'; import process from 'node:process'; -import { exit } from '../helpers/exit.js'; -import { results, timespan } from '../../configs/poku.js'; -import { runTests } from '../../services/run-tests.js'; -import { GLOBAL } from '../../configs/poku.js'; +import { GLOBAL, results, timespan } from '../../configs/poku.js'; import { reporter } from '../../services/reporter.js'; +import { runTests } from '../../services/run-tests.js'; +import { exit } from '../helpers/exit.js'; /* c8 ignore next 1 */ // Process-based export const onSigint = () => process.stdout.write('\u001B[?25h'); diff --git a/src/modules/helpers/create-service.ts b/src/modules/helpers/create-service.ts index 1d9357da..7f2b1b1f 100644 --- a/src/modules/helpers/create-service.ts +++ b/src/modules/helpers/create-service.ts @@ -3,14 +3,14 @@ import type { StartScriptOptions, StartServiceOptions, } from '../../@types/background-process.js'; -import process from 'node:process'; import { spawn } from 'node:child_process'; -import { runner, scriptRunner } from '../../parsers/get-runner.js'; import { normalize } from 'node:path'; -import { sanitizePath } from './list-files.js'; -import { kill } from './kill.js'; -import { log } from '../../services/write.js'; +import process from 'node:process'; +import { runner, scriptRunner } from '../../parsers/get-runner.js'; import { isWindows } from '../../parsers/os.js'; +import { log } from '../../services/write.js'; +import { kill } from './kill.js'; +import { sanitizePath } from './list-files.js'; const runningProcesses: Map = new Map(); diff --git a/src/modules/helpers/describe.ts b/src/modules/helpers/describe.ts index 6694e45e..88c4c4c9 100644 --- a/src/modules/helpers/describe.ts +++ b/src/modules/helpers/describe.ts @@ -1,9 +1,9 @@ import type { DescribeOptions } from '../../@types/describe.js'; import { hrtime } from 'node:process'; -import { todo, skip, onlyDescribe } from './modifiers.js'; -import { hasOnly } from '../../parsers/get-arg.js'; -import { checkOnly } from '../../parsers/callback.js'; import { GLOBAL } from '../../configs/poku.js'; +import { checkOnly } from '../../parsers/callback.js'; +import { hasOnly } from '../../parsers/get-arg.js'; +import { onlyDescribe, skip, todo } from './modifiers.js'; export async function describeBase( arg1: string | (() => unknown | Promise), diff --git a/src/modules/helpers/env.ts b/src/modules/helpers/env.ts index 04ee44c8..7d2263aa 100644 --- a/src/modules/helpers/env.ts +++ b/src/modules/helpers/env.ts @@ -1,11 +1,11 @@ -import { env as processEnv } from 'node:process'; import { readFile } from 'node:fs/promises'; -import { sanitizePath } from './list-files.js'; +import { env as processEnv } from 'node:process'; import { parseEnvLine, removeComments, resolveEnvVariables, } from '../../services/env.js'; +import { sanitizePath } from './list-files.js'; const regex = { comment: /^\s*#/, diff --git a/src/modules/helpers/exit.ts b/src/modules/helpers/exit.ts index a0fa24f2..bca1c50b 100644 --- a/src/modules/helpers/exit.ts +++ b/src/modules/helpers/exit.ts @@ -1,8 +1,7 @@ import type { Code } from '../../@types/code.js'; -import process from 'node:process'; -import { GLOBAL, results } from '../../configs/poku.js'; -import { timespan } from '../../configs/poku.js'; import { AssertionError } from 'node:assert'; +import process from 'node:process'; +import { GLOBAL, results, timespan } from '../../configs/poku.js'; export const exit = (code: Code, quiet?: boolean) => { const isPoku = results.passed > 0 || results.failed > 0; diff --git a/src/modules/helpers/it/core.ts b/src/modules/helpers/it/core.ts index c8f2d2b8..33ed9f04 100644 --- a/src/modules/helpers/it/core.ts +++ b/src/modules/helpers/it/core.ts @@ -1,9 +1,9 @@ import { hrtime } from 'node:process'; import { each } from '../../../configs/each.js'; import { indentation } from '../../../configs/indentation.js'; -import { todo, skip, onlyIt } from '../modifiers.js'; -import { hasOnly } from '../../../parsers/get-arg.js'; import { GLOBAL } from '../../../configs/poku.js'; +import { hasOnly } from '../../../parsers/get-arg.js'; +import { onlyIt, skip, todo } from '../modifiers.js'; export async function itBase( ...args: [ diff --git a/src/modules/helpers/list-files.ts b/src/modules/helpers/list-files.ts index 0d52ecd0..1b36ae5f 100644 --- a/src/modules/helpers/list-files.ts +++ b/src/modules/helpers/list-files.ts @@ -1,7 +1,7 @@ import type { Configs } from '../../@types/list-files.js'; +import { stat as fsStat, readdir } from 'node:fs/promises'; +import { join, sep } from 'node:path'; import { env } from 'node:process'; -import { sep, join } from 'node:path'; -import { readdir, stat as fsStat } from 'node:fs/promises'; import { states } from '../../configs/poku.js'; const regex = { diff --git a/src/modules/helpers/modifiers.ts b/src/modules/helpers/modifiers.ts index c62e83b7..d8d60966 100644 --- a/src/modules/helpers/modifiers.ts +++ b/src/modules/helpers/modifiers.ts @@ -1,11 +1,11 @@ import { exit } from 'node:process'; -import { log } from '../../services/write.js'; +import { GLOBAL } from '../../configs/poku.js'; +import { CheckNoOnly } from '../../parsers/callback.js'; +import { hasOnly } from '../../parsers/get-arg.js'; import { format } from '../../services/format.js'; -import { itBase } from './it/core.js'; +import { log } from '../../services/write.js'; import { describeBase } from './describe.js'; -import { hasOnly } from '../../parsers/get-arg.js'; -import { CheckNoOnly } from '../../parsers/callback.js'; -import { GLOBAL } from '../../configs/poku.js'; +import { itBase } from './it/core.js'; export function todo(message: string): void; export async function todo( diff --git a/src/modules/helpers/wait-for.ts b/src/modules/helpers/wait-for.ts index 255b5148..9c7f0116 100644 --- a/src/modules/helpers/wait-for.ts +++ b/src/modules/helpers/wait-for.ts @@ -2,8 +2,8 @@ import type { WaitForExpectedResultOptions, WaitForPortOptions, } from '../../@types/wait-for.js'; -import { createConnection } from 'node:net'; import { deepEqual, deepStrictEqual } from 'node:assert'; +import { createConnection } from 'node:net'; const checkPort = (port: number, host: string): Promise => new Promise((resolve) => { diff --git a/src/parsers/get-runtime.ts b/src/parsers/get-runtime.ts index 9dcbaae9..8c3c0f57 100644 --- a/src/parsers/get-runtime.ts +++ b/src/parsers/get-runtime.ts @@ -1,6 +1,6 @@ -import { env } from 'node:process'; -import { basename } from 'node:path'; import type { Runtime } from '../@types/poku.js'; +import { basename } from 'node:path'; +import { env } from 'node:process'; export const getRuntime = (): Runtime => { const { _, POKU_RUNTIME } = env; diff --git a/src/parsers/options.ts b/src/parsers/options.ts index f255a450..ece50326 100644 --- a/src/parsers/options.ts +++ b/src/parsers/options.ts @@ -1,8 +1,8 @@ import type { ConfigFile, ConfigJSONFile } from '../@types/poku.js'; -import { normalize, join } from 'node:path'; import { readFile } from 'node:fs/promises'; -import { JSONC } from '../polyfills/jsonc.js'; +import { join, normalize } from 'node:path'; import { GLOBAL } from '../configs/poku.js'; +import { JSONC } from '../polyfills/jsonc.js'; import { isWindows } from './os.js'; export const getConfigs = async ( diff --git a/src/polyfills/deno.mts b/src/polyfills/deno.mts index 2cf4c264..2b4c03d7 100644 --- a/src/polyfills/deno.mts +++ b/src/polyfills/deno.mts @@ -1,6 +1,6 @@ -import { env, exit, cwd } from 'node:process'; import { createRequire } from 'node:module'; -import { resolve, normalize } from 'node:path'; +import { normalize, resolve } from 'node:path'; +import { cwd, env, exit } from 'node:process'; const file = env?.POKU_FILE; if (!file) exit(1); diff --git a/src/polyfills/os.ts b/src/polyfills/os.ts index d1bf05ee..4eb21fb6 100644 --- a/src/polyfills/os.ts +++ b/src/polyfills/os.ts @@ -1,6 +1,6 @@ import { - availableParallelism as nodeAvailableParallelism, cpus, + availableParallelism as nodeAvailableParallelism, } from 'node:os'; export const availableParallelism = (): number => diff --git a/src/services/container.ts b/src/services/container.ts index 93e6a40f..3ece7a8c 100644 --- a/src/services/container.ts +++ b/src/services/container.ts @@ -1,11 +1,12 @@ +import type { SpawnOptionsWithoutStdio } from 'node:child_process'; import type { DockerComposeConfigs, DockerfileConfigs, } from '../@types/container.js'; -import { spawn, type SpawnOptionsWithoutStdio } from 'node:child_process'; -import { log } from '../services/write.js'; -import { isWindows } from '../parsers/os.js'; +import { spawn } from 'node:child_process'; import { sanitizePath } from '../modules/helpers/list-files.js'; +import { isWindows } from '../parsers/os.js'; +import { log } from '../services/write.js'; const runDockerCommand = ( command: string, diff --git a/src/services/each.ts b/src/services/each.ts index cddc8925..57b9816f 100644 --- a/src/services/each.ts +++ b/src/services/each.ts @@ -1,7 +1,7 @@ import type { Configs } from '../@types/poku.js'; -import { format } from './format.js'; -import { log } from '../services/write.js'; import { GLOBAL } from '../configs/poku.js'; +import { log } from '../services/write.js'; +import { format } from './format.js'; const eachCore = async ( type: keyof Required>, diff --git a/src/services/enforce.ts b/src/services/enforce.ts index af323129..57d55e90 100644 --- a/src/services/enforce.ts +++ b/src/services/enforce.ts @@ -1,9 +1,9 @@ -import { argv, exit } from 'node:process'; import { stat } from 'node:fs/promises'; -import { log, hr } from './write.js'; -import { format } from './format.js'; +import { argv, exit } from 'node:process'; import { GLOBAL } from '../configs/poku.js'; import { getArg, hasArg } from '../parsers/get-arg.js'; +import { format } from './format.js'; +import { hr, log } from './write.js'; const errors: string[] = []; diff --git a/src/services/map-tests.ts b/src/services/map-tests.ts index bd0daab3..2ce17409 100644 --- a/src/services/map-tests.ts +++ b/src/services/map-tests.ts @@ -1,5 +1,5 @@ -import { relative, dirname } from 'node:path'; -import { stat, readFile } from 'node:fs/promises'; +import { readFile, stat } from 'node:fs/promises'; +import { dirname, relative } from 'node:path'; import { listFiles } from '../modules/helpers/list-files.js'; const importMap = new Map>(); diff --git a/src/services/reporter.ts b/src/services/reporter.ts index 00b51159..4e53546e 100644 --- a/src/services/reporter.ts +++ b/src/services/reporter.ts @@ -1,10 +1,10 @@ import type { Reporter, ReporterPlugin } from '../@types/poku.js'; -import { poku } from './reporters/poku.js'; -import { dot } from './reporters/dot.js'; +import { classic } from './reporters/classic.js'; import { compact } from './reporters/compact.js'; +import { dot } from './reporters/dot.js'; import { focus } from './reporters/focus.js'; +import { poku } from './reporters/poku.js'; import { verbose } from './reporters/verbose.js'; -import { classic } from './reporters/classic.js'; export const reporter: Record = { poku: () => poku, diff --git a/src/services/reporters/classic.ts b/src/services/reporters/classic.ts index 34ed236d..542129ec 100644 --- a/src/services/reporters/classic.ts +++ b/src/services/reporters/classic.ts @@ -1,8 +1,8 @@ import type { ReporterPlugin } from '../../@types/poku.js'; +import { createReporter } from '../../builders/reporter.js'; import { indentation } from '../../configs/indentation.js'; -import { log, hr } from '../write.js'; import { format } from '../format.js'; -import { createReporter } from '../../builders/reporter.js'; +import { hr, log } from '../write.js'; import { poku } from './poku.js'; export const classic: ReporterPlugin = (() => { diff --git a/src/services/reporters/compact.ts b/src/services/reporters/compact.ts index b03b52c5..7a3e17b5 100644 --- a/src/services/reporters/compact.ts +++ b/src/services/reporters/compact.ts @@ -1,9 +1,9 @@ import type { ReporterPlugin } from '../../@types/poku.js'; -import { hr, log } from '../write.js'; -import { format } from '../format.js'; import { createReporter } from '../../builders/reporter.js'; -import { errors } from './poku.js'; import { parseTimeToSecs } from '../../parsers/time.js'; +import { format } from '../format.js'; +import { hr, log } from '../write.js'; +import { errors } from './poku.js'; export const compact: ReporterPlugin = (() => { let countFails = 0; diff --git a/src/services/reporters/dot.ts b/src/services/reporters/dot.ts index c4c8f8a4..c50db9b1 100644 --- a/src/services/reporters/dot.ts +++ b/src/services/reporters/dot.ts @@ -1,9 +1,9 @@ import type { ReporterPlugin } from '../../@types/poku.js'; +import { stdout } from 'node:process'; import { createReporter } from '../../builders/reporter.js'; -import { hr } from '../write.js'; import { format } from '../format.js'; -import { stdout } from 'node:process'; -import { poku, errors } from './poku.js'; +import { hr } from '../write.js'; +import { errors, poku } from './poku.js'; export const dot: ReporterPlugin = (() => { return createReporter({ diff --git a/src/services/reporters/focus.ts b/src/services/reporters/focus.ts index 3df23eaa..ae4dbaed 100644 --- a/src/services/reporters/focus.ts +++ b/src/services/reporters/focus.ts @@ -1,8 +1,8 @@ import type { ReporterPlugin } from '../../@types/poku.js'; import { createReporter } from '../../builders/reporter.js'; -import { hr, log } from '../write.js'; -import { format } from '../format.js'; import { parseTimeToSecs } from '../../parsers/time.js'; +import { format } from '../format.js'; +import { hr, log } from '../write.js'; export const focus: ReporterPlugin = (() => { let countFails = 0; diff --git a/src/services/reporters/poku.ts b/src/services/reporters/poku.ts index 50c0a94f..87c776dd 100644 --- a/src/services/reporters/poku.ts +++ b/src/services/reporters/poku.ts @@ -1,14 +1,14 @@ +import type { DescribeOptions } from '../../@types/describe.js'; import type { ReporterPlugin } from '../../@types/poku.js'; +import { relative, resolve } from 'node:path'; +import { stdout } from 'node:process'; import { indentation } from '../../configs/indentation.js'; -import { parseTime, parseTimeToSecs } from '../../parsers/time.js'; -import { log, hr } from '../write.js'; -import { format } from '../format.js'; import { GLOBAL } from '../../configs/poku.js'; -import { findFile } from '../../parsers/find-file-from-stack.js'; -import { relative, resolve } from 'node:path'; import { parseResultType } from '../../parsers/assert.js'; -import type { DescribeOptions } from '../../@types/describe.js'; -import { stdout } from 'node:process'; +import { findFile } from '../../parsers/find-file-from-stack.js'; +import { parseTime, parseTimeToSecs } from '../../parsers/time.js'; +import { format } from '../format.js'; +import { hr, log } from '../write.js'; const regexFile = /file:(\/\/)?/; diff --git a/src/services/run-test-file.ts b/src/services/run-test-file.ts index 24626d30..503220a8 100644 --- a/src/services/run-test-file.ts +++ b/src/services/run-test-file.ts @@ -1,11 +1,11 @@ -import { hrtime, env } from 'node:process'; -import { relative } from 'node:path'; import { spawn } from 'node:child_process'; -import { runner } from '../parsers/get-runner.js'; -import { parserOutput } from '../parsers/output.js'; -import { beforeEach, afterEach } from './each.js'; +import { relative } from 'node:path'; +import { env, hrtime } from 'node:process'; import { deepOptions, GLOBAL, VERSION } from '../configs/poku.js'; +import { runner } from '../parsers/get-runner.js'; import { isWindows } from '../parsers/os.js'; +import { parserOutput } from '../parsers/output.js'; +import { afterEach, beforeEach } from './each.js'; export const runTestFile = async (path: string): Promise => { const { cwd, configs, reporter } = GLOBAL; diff --git a/src/services/run-tests.ts b/src/services/run-tests.ts index 413c0d1c..0e0f3b35 100644 --- a/src/services/run-tests.ts +++ b/src/services/run-tests.ts @@ -1,12 +1,12 @@ +import { join, relative } from 'node:path'; import process from 'node:process'; -import { relative, join } from 'node:path'; +import { deepOptions, GLOBAL, results } from '../configs/poku.js'; import { listFiles } from '../modules/helpers/list-files.js'; -import { log, hr } from '../services/write.js'; +import { hasOnly } from '../parsers/get-arg.js'; +import { availableParallelism } from '../polyfills/os.js'; +import { hr, log } from '../services/write.js'; import { format } from './format.js'; import { runTestFile } from './run-test-file.js'; -import { deepOptions, GLOBAL, results } from '../configs/poku.js'; -import { availableParallelism } from '../polyfills/os.js'; -import { hasOnly } from '../parsers/get-arg.js'; const { cwd } = GLOBAL; diff --git a/src/services/watch.ts b/src/services/watch.ts index 0fd5fa9b..414a47ab 100644 --- a/src/services/watch.ts +++ b/src/services/watch.ts @@ -1,7 +1,8 @@ +import type { FSWatcher } from 'node:fs'; import type { WatchCallback } from '../@types/watch.js'; -import { watch as nodeWatch, type FSWatcher } from 'node:fs'; -import { join } from 'node:path'; +import { watch as nodeWatch } from 'node:fs'; import { readdir, stat } from 'node:fs/promises'; +import { join } from 'node:path'; import { listFiles } from '../modules/helpers/list-files.js'; export class Watcher { diff --git a/test/__fixtures__/e2e/each-api/after-failure.test.ts b/test/__fixtures__/e2e/each-api/after-failure.test.ts index e8f4ce0e..5bf92482 100644 --- a/test/__fixtures__/e2e/each-api/after-failure.test.ts +++ b/test/__fixtures__/e2e/each-api/after-failure.test.ts @@ -1,11 +1,11 @@ -import { readFile, writeFile, rm, mkdir } from 'node:fs/promises'; +import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'; import { - beforeEach, afterEach, + assert, + beforeEach, + describe, log, test, - describe, - assert, } from '../../../../src/modules/index.js'; const testDir = '../../.temp/after-failure'; diff --git a/test/__fixtures__/e2e/each-api/async.test.ts b/test/__fixtures__/e2e/each-api/async.test.ts index 91a83012..10a76940 100644 --- a/test/__fixtures__/e2e/each-api/async.test.ts +++ b/test/__fixtures__/e2e/each-api/async.test.ts @@ -1,11 +1,11 @@ import { - beforeEach, afterEach, - log, - test, - describe, assert, + beforeEach, + describe, + log, sleep, + test, } from '../../../../src/modules/index.js'; const clearFixture = async () => { diff --git a/test/__fixtures__/e2e/each-api/sync-with-async-tests.test.ts b/test/__fixtures__/e2e/each-api/sync-with-async-tests.test.ts index 2cd173af..c4993ec9 100644 --- a/test/__fixtures__/e2e/each-api/sync-with-async-tests.test.ts +++ b/test/__fixtures__/e2e/each-api/sync-with-async-tests.test.ts @@ -1,11 +1,11 @@ import { - beforeEach, afterEach, - log, - test, - describe, assert, + beforeEach, + describe, + log, sleep, + test, } from '../../../../src/modules/index.js'; const clearFixture = () => { diff --git a/test/__fixtures__/e2e/each-api/sync.test.ts b/test/__fixtures__/e2e/each-api/sync.test.ts index e3e7ad72..54bcff5a 100644 --- a/test/__fixtures__/e2e/each-api/sync.test.ts +++ b/test/__fixtures__/e2e/each-api/sync.test.ts @@ -1,10 +1,10 @@ import { - beforeEach, afterEach, + assert, + beforeEach, + describe, log, test, - describe, - assert, } from '../../../../src/modules/index.js'; const clearFixture = () => { diff --git a/test/__fixtures__/e2e/each-file/api.test.ts b/test/__fixtures__/e2e/each-file/api.test.ts index d629304f..7be6db43 100644 --- a/test/__fixtures__/e2e/each-file/api.test.ts +++ b/test/__fixtures__/e2e/each-file/api.test.ts @@ -1,8 +1,8 @@ -import { test } from '../../../../src/modules/helpers/test.js'; +import { assert } from '../../../../src/modules/essentials/assert.js'; +import { poku } from '../../../../src/modules/essentials/poku.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; -import { poku } from '../../../../src/modules/essentials/poku.js'; -import { assert } from '../../../../src/modules/essentials/assert.js'; +import { test } from '../../../../src/modules/helpers/test.js'; test(async () => { const prepareService = () => new Promise((resolve) => resolve(undefined)); diff --git a/test/__fixtures__/e2e/env/set-env.test.ts b/test/__fixtures__/e2e/env/set-env.test.ts index 01232b64..089064d1 100644 --- a/test/__fixtures__/e2e/env/set-env.test.ts +++ b/test/__fixtures__/e2e/env/set-env.test.ts @@ -1,8 +1,8 @@ import process from 'node:process'; -import { test } from '../../../../src/modules/helpers/test.js'; +import { GLOBAL } from '../../../../src/configs/poku.js'; import { assert } from '../../../../src/modules/essentials/assert.js'; +import { test } from '../../../../src/modules/helpers/test.js'; import { runtimeVersion } from '../../../../src/parsers/runtime-version.js'; -import { GLOBAL } from '../../../../src/configs/poku.js'; test('Defining Variables', () => { const noValue = diff --git a/test/__fixtures__/e2e/no-runner/basic-logs.test.ts b/test/__fixtures__/e2e/no-runner/basic-logs.test.ts index ebcd7e56..c1a55ae1 100644 --- a/test/__fixtures__/e2e/no-runner/basic-logs.test.ts +++ b/test/__fixtures__/e2e/no-runner/basic-logs.test.ts @@ -1,7 +1,7 @@ import { assert } from '../../../../src/modules/essentials/assert.js'; -import { test } from '../../../../src/modules/helpers/test.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; +import { test } from '../../../../src/modules/helpers/test.js'; assert(true, 'Should emit a basic assetion log'); diff --git a/test/__fixtures__/e2e/only/hooks.test.ts b/test/__fixtures__/e2e/only/hooks.test.ts index ae75780e..800de939 100644 --- a/test/__fixtures__/e2e/only/hooks.test.ts +++ b/test/__fixtures__/e2e/only/hooks.test.ts @@ -1,8 +1,8 @@ -import { test } from '../../../../src/modules/helpers/test.js'; +import { assert } from '../../../../src/modules/essentials/assert.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../../../src/modules/helpers/each.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; -import { beforeEach, afterEach } from '../../../../src/modules/helpers/each.js'; -import { assert } from '../../../../src/modules/essentials/assert.js'; +import { test } from '../../../../src/modules/helpers/test.js'; let counter = 0; let beforeHookCounter = 0; diff --git a/test/__fixtures__/e2e/sequential/a.test.ts b/test/__fixtures__/e2e/sequential/a.test.ts index 2584583b..ac2f314e 100644 --- a/test/__fixtures__/e2e/sequential/a.test.ts +++ b/test/__fixtures__/e2e/sequential/a.test.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs'; -import { writeFile, rm, mkdir } from 'node:fs/promises'; -import { test, assert } from '../../../../src/modules/index.js'; +import { mkdir, rm, writeFile } from 'node:fs/promises'; +import { assert, test } from '../../../../src/modules/index.js'; test(async () => { const testDir = '../../.temp/sequential'; diff --git a/test/__fixtures__/e2e/sequential/b.test.ts b/test/__fixtures__/e2e/sequential/b.test.ts index 2584583b..ac2f314e 100644 --- a/test/__fixtures__/e2e/sequential/b.test.ts +++ b/test/__fixtures__/e2e/sequential/b.test.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs'; -import { writeFile, rm, mkdir } from 'node:fs/promises'; -import { test, assert } from '../../../../src/modules/index.js'; +import { mkdir, rm, writeFile } from 'node:fs/promises'; +import { assert, test } from '../../../../src/modules/index.js'; test(async () => { const testDir = '../../.temp/sequential'; diff --git a/test/__fixtures__/e2e/sequential/c.test.ts b/test/__fixtures__/e2e/sequential/c.test.ts index 2584583b..ac2f314e 100644 --- a/test/__fixtures__/e2e/sequential/c.test.ts +++ b/test/__fixtures__/e2e/sequential/c.test.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs'; -import { writeFile, rm, mkdir } from 'node:fs/promises'; -import { test, assert } from '../../../../src/modules/index.js'; +import { mkdir, rm, writeFile } from 'node:fs/promises'; +import { assert, test } from '../../../../src/modules/index.js'; test(async () => { const testDir = '../../.temp/sequential'; diff --git a/test/__fixtures__/e2e/sequential/d.test.ts b/test/__fixtures__/e2e/sequential/d.test.ts index 2584583b..ac2f314e 100644 --- a/test/__fixtures__/e2e/sequential/d.test.ts +++ b/test/__fixtures__/e2e/sequential/d.test.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs'; -import { writeFile, rm, mkdir } from 'node:fs/promises'; -import { test, assert } from '../../../../src/modules/index.js'; +import { mkdir, rm, writeFile } from 'node:fs/promises'; +import { assert, test } from '../../../../src/modules/index.js'; test(async () => { const testDir = '../../.temp/sequential'; diff --git a/test/__fixtures__/e2e/sequential/e.test.ts b/test/__fixtures__/e2e/sequential/e.test.ts index 2584583b..ac2f314e 100644 --- a/test/__fixtures__/e2e/sequential/e.test.ts +++ b/test/__fixtures__/e2e/sequential/e.test.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs'; -import { writeFile, rm, mkdir } from 'node:fs/promises'; -import { test, assert } from '../../../../src/modules/index.js'; +import { mkdir, rm, writeFile } from 'node:fs/promises'; +import { assert, test } from '../../../../src/modules/index.js'; test(async () => { const testDir = '../../.temp/sequential'; diff --git a/test/__fixtures__/e2e/skip/skip-helper.test.ts b/test/__fixtures__/e2e/skip/skip-helper.test.ts index 0bdc0c66..726f2dba 100644 --- a/test/__fixtures__/e2e/skip/skip-helper.test.ts +++ b/test/__fixtures__/e2e/skip/skip-helper.test.ts @@ -1,6 +1,6 @@ import { exit } from 'node:process'; -import { skip } from '../../../../src/modules/helpers/skip.js'; import { GLOBAL } from '../../../../src/configs/poku.js'; +import { skip } from '../../../../src/modules/helpers/skip.js'; // Mock GLOBAL.isPoku = false; diff --git a/test/__fixtures__/e2e/skip/skip-modifier.test.ts b/test/__fixtures__/e2e/skip/skip-modifier.test.ts index ca98bd1c..e8cc79dc 100644 --- a/test/__fixtures__/e2e/skip/skip-modifier.test.ts +++ b/test/__fixtures__/e2e/skip/skip-modifier.test.ts @@ -1,7 +1,7 @@ +import { exit } from 'node:process'; import { describe } from '../../../../src/modules/helpers/describe.js'; -import { test } from '../../../../src/modules/helpers/test.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; -import { exit } from 'node:process'; +import { test } from '../../../../src/modules/helpers/test.js'; describe.skip('1', () => { exit(1); diff --git a/test/__utils__/capture-cli.test.ts b/test/__utils__/capture-cli.test.ts index f902d5c2..523962f3 100644 --- a/test/__utils__/capture-cli.test.ts +++ b/test/__utils__/capture-cli.test.ts @@ -1,13 +1,13 @@ -import process, { env } from 'node:process'; -import { - type ChildProcessWithoutNullStreams, - spawn, - type SpawnOptionsWithoutStdio, +import type { + ChildProcessWithoutNullStreams, + SpawnOptionsWithoutStdio, } from 'node:child_process'; -import { runner } from '../../src/parsers/get-runner.js'; +import { spawn } from 'node:child_process'; +import process, { env } from 'node:process'; +import { GLOBAL } from '../../src/configs/poku.js'; import { kill as pokuKill } from '../../src/modules/helpers/kill.js'; +import { runner } from '../../src/parsers/get-runner.js'; import { isWindows } from '../../src/parsers/os.js'; -import { GLOBAL } from '../../src/configs/poku.js'; export const isBuild = process.env.NODE_ENV === 'build'; diff --git a/test/c8.test.ts b/test/c8.test.ts index 3698fb92..b814ddeb 100644 --- a/test/c8.test.ts +++ b/test/c8.test.ts @@ -1,9 +1,9 @@ import { rmSync } from 'node:fs'; -import { poku, test, describe, it, assert } from '../src/modules/index.js'; -import { isWindows } from '../src/parsers/os.js'; -import { inspectPoku } from './__utils__/capture-cli.test.js'; import { GLOBAL } from '../src/configs/poku.js'; import { beforeEach } from '../src/modules/helpers/each.js'; +import { assert, describe, it, poku, test } from '../src/modules/index.js'; +import { isWindows } from '../src/parsers/os.js'; +import { inspectPoku } from './__utils__/capture-cli.test.js'; beforeEach(() => { GLOBAL.configs = Object.create(null); diff --git a/test/ci.test.ts b/test/ci.test.ts index 6e3b0cc1..7e8d91c6 100644 --- a/test/ci.test.ts +++ b/test/ci.test.ts @@ -1,7 +1,7 @@ import { poku } from '../src/modules/essentials/poku.js'; -import { test } from '../src/modules/helpers/test.js'; -import { exit } from '../src/modules/helpers/exit.js'; import { docker } from '../src/modules/helpers/container.js'; +import { exit } from '../src/modules/helpers/exit.js'; +import { test } from '../src/modules/helpers/test.js'; test(async () => { const compose = docker.compose({ cwd: './test/__docker__' }); diff --git a/test/compatibility/by-docker-compose/node-14.test.ts b/test/compatibility/by-docker-compose/node-14.test.ts index e6b388cd..09e7c414 100644 --- a/test/compatibility/by-docker-compose/node-14.test.ts +++ b/test/compatibility/by-docker-compose/node-14.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-14'; diff --git a/test/compatibility/by-docker-compose/node-16.test.ts b/test/compatibility/by-docker-compose/node-16.test.ts index eabc62ab..424fd18b 100644 --- a/test/compatibility/by-docker-compose/node-16.test.ts +++ b/test/compatibility/by-docker-compose/node-16.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-16'; diff --git a/test/compatibility/by-docker-compose/node-18.test.ts b/test/compatibility/by-docker-compose/node-18.test.ts index 29ea5204..aa64ef54 100644 --- a/test/compatibility/by-docker-compose/node-18.test.ts +++ b/test/compatibility/by-docker-compose/node-18.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-18'; diff --git a/test/compatibility/by-docker-compose/node-20.test.ts b/test/compatibility/by-docker-compose/node-20.test.ts index 76abd68a..0103ca95 100644 --- a/test/compatibility/by-docker-compose/node-20.test.ts +++ b/test/compatibility/by-docker-compose/node-20.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-20'; diff --git a/test/compatibility/by-docker-compose/node-22.test.ts b/test/compatibility/by-docker-compose/node-22.test.ts index 8cc8cf28..1f3468ce 100644 --- a/test/compatibility/by-docker-compose/node-22.test.ts +++ b/test/compatibility/by-docker-compose/node-22.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-22'; diff --git a/test/compatibility/by-docker-compose/node-23.test.ts b/test/compatibility/by-docker-compose/node-23.test.ts index bc6fdc9d..f103a19c 100644 --- a/test/compatibility/by-docker-compose/node-23.test.ts +++ b/test/compatibility/by-docker-compose/node-23.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; const projectName = 'poku'; const serviceName = 'node-23'; diff --git a/test/compatibility/by-dockerfile/node-20.test.ts b/test/compatibility/by-dockerfile/node-20.test.ts index 50214aec..d5e4d54b 100644 --- a/test/compatibility/by-dockerfile/node-20.test.ts +++ b/test/compatibility/by-dockerfile/node-20.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { test } from '../../../src/modules/helpers/test.js'; import { skip } from '../../../src/modules/index.js'; skip("It's just an example 📘"); diff --git a/test/e2e/background-process.test.ts b/test/e2e/background-process.test.ts index 9e6959e2..b419aedd 100644 --- a/test/e2e/background-process.test.ts +++ b/test/e2e/background-process.test.ts @@ -1,15 +1,15 @@ -import { test } from '../../src/modules/helpers/test.js'; -import { describe } from '../../src/modules/helpers/describe.js'; -import { it } from '../../src/modules/helpers/it/core.js'; +import { ext } from '../__utils__/capture-cli.test.js'; +import { legacyFetch } from '../__utils__/legacy-fetch.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; import { assert } from '../../src/modules/essentials/assert.js'; import { startScript, startService, } from '../../src/modules/helpers/create-service.js'; -import { legacyFetch } from '../__utils__/legacy-fetch.test.js'; -import { ext } from '../__utils__/capture-cli.test.js'; +import { describe } from '../../src/modules/helpers/describe.js'; +import { it } from '../../src/modules/helpers/it/core.js'; +import { test } from '../../src/modules/helpers/test.js'; import { waitForPort } from '../../src/modules/helpers/wait-for.js'; -import { GLOBAL } from '../../src/configs/poku.js'; test(async () => { const { runtime } = GLOBAL; diff --git a/test/e2e/basic-logs.test.ts b/test/e2e/basic-logs.test.ts index ea7101be..2bc88496 100644 --- a/test/e2e/basic-logs.test.ts +++ b/test/e2e/basic-logs.test.ts @@ -1,8 +1,8 @@ import process, { env } from 'node:process'; +import { ext, inspectCLI } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { ext, inspectCLI } from '../__utils__/capture-cli.test.js'; import { runner } from '../../src/parsers/get-runner.js'; describe('Basic logs with Runner', async () => { diff --git a/test/e2e/before-and-after-each.test.ts b/test/e2e/before-and-after-each.test.ts index aff02e0e..341a812e 100644 --- a/test/e2e/before-and-after-each.test.ts +++ b/test/e2e/before-and-after-each.test.ts @@ -1,7 +1,7 @@ +import { ext, inspectPoku } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, ext } from '../__utils__/capture-cli.test.js'; describe(async () => { await it('Before and After Each File', async () => { diff --git a/test/e2e/cli-ensure-flags.test.ts b/test/e2e/cli-ensure-flags.test.ts index 64981a22..1ddc1be9 100644 --- a/test/e2e/cli-ensure-flags.test.ts +++ b/test/e2e/cli-ensure-flags.test.ts @@ -1,9 +1,9 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../src/configs/poku.js'; if (isBuild || GLOBAL.runtime !== 'node') skip(); diff --git a/test/e2e/cli-flags.test.ts b/test/e2e/cli-flags.test.ts index 6f94db20..7869f284 100644 --- a/test/e2e/cli-flags.test.ts +++ b/test/e2e/cli-flags.test.ts @@ -1,7 +1,7 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; if (isBuild) skip(); diff --git a/test/e2e/config-files.test.ts b/test/e2e/config-files.test.ts index c4f38b0f..858c7c56 100644 --- a/test/e2e/config-files.test.ts +++ b/test/e2e/config-files.test.ts @@ -1,9 +1,9 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../src/configs/poku.js'; if (isBuild) skip(); diff --git a/test/e2e/each-api-failure.test.ts b/test/e2e/each-api-failure.test.ts index dd615d5f..a8225d91 100644 --- a/test/e2e/each-api-failure.test.ts +++ b/test/e2e/each-api-failure.test.ts @@ -1,8 +1,8 @@ +import { statSync } from 'node:fs'; +import { ext, inspectPoku } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { ext, inspectPoku } from '../__utils__/capture-cli.test.js'; -import { statSync } from 'node:fs'; describe('Testing afterEach execution after a test failure', async () => { await it(async () => { diff --git a/test/e2e/each-api-order.test.ts b/test/e2e/each-api-order.test.ts index bbb38ea8..37ba842b 100644 --- a/test/e2e/each-api-order.test.ts +++ b/test/e2e/each-api-order.test.ts @@ -1,9 +1,9 @@ +import { ext, inspectPoku } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { ext, inspectPoku } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../src/configs/poku.js'; if (GLOBAL.runtime === 'deno') skip(); diff --git a/test/e2e/env-file.test.ts b/test/e2e/env-file.test.ts index 84a0bb34..62554cf1 100644 --- a/test/e2e/env-file.test.ts +++ b/test/e2e/env-file.test.ts @@ -1,10 +1,10 @@ import process from 'node:process'; +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; -import { isWindows } from '../../src/parsers/os.js'; import { skip } from '../../src/modules/helpers/skip.js'; +import { isWindows } from '../../src/parsers/os.js'; if (isBuild) skip(); diff --git a/test/e2e/exit-code.test.ts b/test/e2e/exit-code.test.ts index 694c4109..05a249f5 100644 --- a/test/e2e/exit-code.test.ts +++ b/test/e2e/exit-code.test.ts @@ -1,7 +1,7 @@ +import { assert } from '../../src/modules/essentials/assert.js'; +import { poku } from '../../src/modules/essentials/poku.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { poku } from '../../src/modules/essentials/poku.js'; -import { assert } from '../../src/modules/essentials/assert.js'; describe('Poku Runner Suite', async () => { await Promise.all([ diff --git a/test/e2e/fail-fast.test.ts b/test/e2e/fail-fast.test.ts index d9ab714e..c2968bbf 100644 --- a/test/e2e/fail-fast.test.ts +++ b/test/e2e/fail-fast.test.ts @@ -1,8 +1,8 @@ -import { describe } from '../../src/modules/helpers/describe.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; -import { skip } from '../../src/modules/helpers/skip.js'; import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; +import { describe } from '../../src/modules/helpers/describe.js'; +import { skip } from '../../src/modules/helpers/skip.js'; if (isBuild || GLOBAL.runtime === 'deno') skip(); diff --git a/test/e2e/failure.test.ts b/test/e2e/failure.test.ts index 93d4c8a6..72fe955d 100644 --- a/test/e2e/failure.test.ts +++ b/test/e2e/failure.test.ts @@ -1,9 +1,9 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../src/configs/poku.js'; const { runtime } = GLOBAL; diff --git a/test/e2e/final-results.test.ts b/test/e2e/final-results.test.ts index d14a0a42..2373c81a 100644 --- a/test/e2e/final-results.test.ts +++ b/test/e2e/final-results.test.ts @@ -1,7 +1,7 @@ +import { inspectPoku } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku } from '../__utils__/capture-cli.test.js'; describe('Final Results', async () => { await it('Skip', async () => { diff --git a/test/e2e/help.test.ts b/test/e2e/help.test.ts index c6efe225..7d252990 100644 --- a/test/e2e/help.test.ts +++ b/test/e2e/help.test.ts @@ -1,9 +1,9 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; -import { GLOBAL } from '../../src/configs/poku.js'; if (isBuild || GLOBAL.runtime === 'deno') skip(); diff --git a/test/e2e/ignored-paths.test.ts b/test/e2e/ignored-paths.test.ts index a72b6b27..6dc5acb6 100644 --- a/test/e2e/ignored-paths.test.ts +++ b/test/e2e/ignored-paths.test.ts @@ -1,10 +1,10 @@ -import { join } from 'node:path'; import { accessSync, mkdirSync, rmSync, writeFileSync } from 'node:fs'; -import { describe } from '../../src/modules/helpers/describe.js'; -import { assert } from '../../src/modules/essentials/assert.js'; +import { join } from 'node:path'; import { inspectPoku } from '../__utils__/capture-cli.test.js'; -import { isWindows } from '../../src/parsers/os.js'; +import { assert } from '../../src/modules/essentials/assert.js'; +import { describe } from '../../src/modules/helpers/describe.js'; import { skip } from '../../src/modules/helpers/skip.js'; +import { isWindows } from '../../src/parsers/os.js'; if (isWindows) skip(); diff --git a/test/e2e/list-files.test.ts b/test/e2e/list-files.test.ts index 0b582ff3..066725b3 100644 --- a/test/e2e/list-files.test.ts +++ b/test/e2e/list-files.test.ts @@ -1,10 +1,10 @@ -import { describe } from '../../src/modules/helpers/describe.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; +import { describe } from '../../src/modules/helpers/describe.js'; +import { it } from '../../src/modules/helpers/it/core.js'; import { skip } from '../../src/modules/helpers/skip.js'; import { isWindows } from '../../src/parsers/os.js'; -import { it } from '../../src/modules/helpers/it/core.js'; -import { GLOBAL } from '../../src/configs/poku.js'; if (GLOBAL.runtime === 'deno' || isBuild || isWindows) skip(); diff --git a/test/e2e/no-tests-with-unlimited-concurrency.test.ts b/test/e2e/no-tests-with-unlimited-concurrency.test.ts index 09fd7212..617a362d 100644 --- a/test/e2e/no-tests-with-unlimited-concurrency.test.ts +++ b/test/e2e/no-tests-with-unlimited-concurrency.test.ts @@ -1,7 +1,7 @@ -import { test } from '../../src/modules/helpers/test.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { skip } from '../../src/modules/helpers/skip.js'; +import { test } from '../../src/modules/helpers/test.js'; if (isBuild) skip(); diff --git a/test/e2e/only.test.ts b/test/e2e/only.test.ts index bd1db138..2f54029a 100644 --- a/test/e2e/only.test.ts +++ b/test/e2e/only.test.ts @@ -1,7 +1,7 @@ +import { ext, inspectCLI, inspectPoku } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { ext, inspectCLI, inspectPoku } from '../__utils__/capture-cli.test.js'; import { runner } from '../../src/parsers/get-runner.js'; describe('Only', async () => { diff --git a/test/e2e/reporters.test.ts b/test/e2e/reporters.test.ts index dc6e497c..b620455b 100644 --- a/test/e2e/reporters.test.ts +++ b/test/e2e/reporters.test.ts @@ -1,7 +1,7 @@ +import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; if (isBuild) skip(); diff --git a/test/e2e/runners.test.ts b/test/e2e/runners.test.ts index 003a0680..0ed46595 100644 --- a/test/e2e/runners.test.ts +++ b/test/e2e/runners.test.ts @@ -1,8 +1,8 @@ import { execSync } from 'node:child_process'; +import { inspectCLI, isBuild } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { inspectCLI, isBuild } from '../__utils__/capture-cli.test.js'; import { skip } from '../../src/modules/helpers/skip.js'; if (isBuild) skip(); diff --git a/test/e2e/sequential.test.ts b/test/e2e/sequential.test.ts index 5c16d799..9f8de659 100644 --- a/test/e2e/sequential.test.ts +++ b/test/e2e/sequential.test.ts @@ -1,8 +1,8 @@ -import { describe } from '../../src/modules/helpers/describe.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { inspectPoku, isBuild } from '../__utils__/capture-cli.test.js'; -import { skip } from '../../src/modules/helpers/skip.js'; import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; +import { describe } from '../../src/modules/helpers/describe.js'; +import { skip } from '../../src/modules/helpers/skip.js'; if (GLOBAL.runtime === 'deno' || isBuild) skip(); diff --git a/test/e2e/skip.test.ts b/test/e2e/skip.test.ts index 1e2c8e89..3ef48aa3 100644 --- a/test/e2e/skip.test.ts +++ b/test/e2e/skip.test.ts @@ -1,7 +1,7 @@ +import { ext, inspectCLI, inspectPoku } from '../__utils__/capture-cli.test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { ext, inspectPoku, inspectCLI } from '../__utils__/capture-cli.test.js'; import { runner } from '../../src/parsers/get-runner.js'; describe('Skip', async () => { diff --git a/test/e2e/watch.test.ts b/test/e2e/watch.test.ts index cd66a01a..a3135249 100644 --- a/test/e2e/watch.test.ts +++ b/test/e2e/watch.test.ts @@ -1,18 +1,17 @@ +import { readFile, writeFile } from 'node:fs/promises'; import { isBuild, watchCLI } from '../__utils__/capture-cli.test.js'; -import { isWindows } from '../../src/parsers/os.js'; -import { skip } from '../../src/modules/helpers/skip.js'; - -if (isBuild || GLOBAL.runtime !== 'node' || isWindows) skip(); - +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; +import { skip } from '../../src/modules/helpers/skip.js'; import { sleep, waitForExpectedResult, } from '../../src/modules/helpers/wait-for.js'; -import { readFile, writeFile } from 'node:fs/promises'; -import { GLOBAL } from '../../src/configs/poku.js'; +import { isWindows } from '../../src/parsers/os.js'; + +if (isBuild || GLOBAL.runtime !== 'node' || isWindows) skip(); const saveFileUnchanged = async (filename: string) => { const data = await readFile(filename, 'utf8'); diff --git a/test/integration/assert/assert-no-message.test.ts b/test/integration/assert/assert-no-message.test.ts index 0dc6a363..a38e1391 100644 --- a/test/integration/assert/assert-no-message.test.ts +++ b/test/integration/assert/assert-no-message.test.ts @@ -1,6 +1,6 @@ +import { assert } from '../../../src/modules/essentials/assert.js'; import { describe } from '../../../src/modules/helpers/describe.js'; import { it } from '../../../src/modules/helpers/it/core.js'; -import { assert } from '../../../src/modules/essentials/assert.js'; describe('Assert Suite (No Message)', () => { it(() => { diff --git a/test/integration/assert/assert.test.ts b/test/integration/assert/assert.test.ts index 7fc1f971..b4549a36 100644 --- a/test/integration/assert/assert.test.ts +++ b/test/integration/assert/assert.test.ts @@ -1,6 +1,6 @@ +import { assert } from '../../../src/modules/essentials/assert.js'; import { describe } from '../../../src/modules/helpers/describe.js'; import { it } from '../../../src/modules/helpers/it/core.js'; -import { assert } from '../../../src/modules/essentials/assert.js'; describe('Assert Suite', async () => { it(() => { diff --git a/test/integration/before-and-after-each/external-file-update.test.ts b/test/integration/before-and-after-each/external-file-update.test.ts index f305b2cb..28b669e8 100644 --- a/test/integration/before-and-after-each/external-file-update.test.ts +++ b/test/integration/before-and-after-each/external-file-update.test.ts @@ -1,10 +1,10 @@ import fs from 'node:fs'; import path from 'node:path'; -import { test } from '../../../src/modules/helpers/test.js'; -import { poku } from '../../../src/modules/essentials/poku.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { poku } from '../../../src/modules/essentials/poku.js'; import { skip } from '../../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { test } from '../../../src/modules/helpers/test.js'; const { runtime } = GLOBAL; diff --git a/test/integration/before-and-after-each/invalid.test.ts b/test/integration/before-and-after-each/invalid.test.ts index 5723d27f..ad9c2869 100644 --- a/test/integration/before-and-after-each/invalid.test.ts +++ b/test/integration/before-and-after-each/invalid.test.ts @@ -1,9 +1,9 @@ -import { test } from '../../../src/modules/helpers/test.js'; -import { poku } from '../../../src/modules/essentials/poku.js'; import { ext } from '../../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { poku } from '../../../src/modules/essentials/poku.js'; import { skip } from '../../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { test } from '../../../src/modules/helpers/test.js'; if (GLOBAL.runtime === 'deno') skip(); diff --git a/test/integration/containers/test-docker-compose.test.ts b/test/integration/containers/test-docker-compose.test.ts index 15f3d481..9d76964b 100644 --- a/test/integration/containers/test-docker-compose.test.ts +++ b/test/integration/containers/test-docker-compose.test.ts @@ -1,14 +1,14 @@ import { execSync } from 'node:child_process'; import { env } from 'node:process'; -import { describe } from '../../../src/modules/helpers/describe.js'; -import { it } from '../../../src/modules/helpers/it/core.js'; +import { legacyFetch } from '../../__utils__/legacy-fetch.test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; -import { legacyFetch } from '../../__utils__/legacy-fetch.test.js'; -import { isWindows } from '../../../src/parsers/os.js'; -import { waitForPort } from '../../../src/modules/helpers/wait-for.js'; +import { describe } from '../../../src/modules/helpers/describe.js'; +import { it } from '../../../src/modules/helpers/it/core.js'; import { kill } from '../../../src/modules/helpers/kill.js'; import { skip } from '../../../src/modules/helpers/skip.js'; +import { waitForPort } from '../../../src/modules/helpers/wait-for.js'; +import { isWindows } from '../../../src/parsers/os.js'; if (isWindows) { skip('External error: no matching manifest for windows/amd64'); diff --git a/test/integration/containers/test-dockerfile.test.ts b/test/integration/containers/test-dockerfile.test.ts index 66128b9c..c9589068 100644 --- a/test/integration/containers/test-dockerfile.test.ts +++ b/test/integration/containers/test-dockerfile.test.ts @@ -1,14 +1,14 @@ import { execSync } from 'node:child_process'; import { env } from 'node:process'; -import { describe } from '../../../src/modules/helpers/describe.js'; -import { it } from '../../../src/modules/helpers/it/core.js'; +import { legacyFetch } from '../../__utils__/legacy-fetch.test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { docker } from '../../../src/modules/helpers/container.js'; +import { describe } from '../../../src/modules/helpers/describe.js'; +import { it } from '../../../src/modules/helpers/it/core.js'; +import { kill } from '../../../src/modules/helpers/kill.js'; +import { skip } from '../../../src/modules/helpers/skip.js'; import { waitForPort } from '../../../src/modules/helpers/wait-for.js'; -import { legacyFetch } from '../../__utils__/legacy-fetch.test.js'; import { isWindows } from '../../../src/parsers/os.js'; -import { skip } from '../../../src/modules/helpers/skip.js'; -import { kill } from '../../../src/modules/helpers/kill.js'; if (isWindows) { skip('External error: no matching manifest for windows/amd64'); diff --git a/test/integration/describe/describe.test.ts b/test/integration/describe/describe.test.ts index 8efb7a57..57708c0e 100644 --- a/test/integration/describe/describe.test.ts +++ b/test/integration/describe/describe.test.ts @@ -1,6 +1,6 @@ import { describe } from '../../../src/modules/helpers/describe.js'; -import { test } from '../../../src/modules/helpers/test.js'; import { log } from '../../../src/modules/helpers/log.js'; +import { test } from '../../../src/modules/helpers/test.js'; describe('Testing "describe" method', { icon: '🔬', diff --git a/test/integration/import.test.ts b/test/integration/import.test.ts index 150c86b4..a3a78d6a 100644 --- a/test/integration/import.test.ts +++ b/test/integration/import.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../src/modules/helpers/test.js'; -import { skip } from '../../src/modules/helpers/skip.js'; import { GLOBAL } from '../../src/configs/poku.js'; +import { skip } from '../../src/modules/helpers/skip.js'; +import { test } from '../../src/modules/helpers/test.js'; if (GLOBAL.runtime === 'deno') skip(); diff --git a/test/integration/it/each/each-options-promise.test.ts b/test/integration/it/each/each-options-promise.test.ts index cc3f1df9..1d95e2ab 100644 --- a/test/integration/it/each/each-options-promise.test.ts +++ b/test/integration/it/each/each-options-promise.test.ts @@ -1,7 +1,7 @@ +import { assert } from '../../../../src/modules/essentials/assert.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../../../src/modules/helpers/each.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; -import { assert } from '../../../../src/modules/essentials/assert.js'; -import { beforeEach, afterEach } from '../../../../src/modules/helpers/each.js'; let counter = 0; diff --git a/test/integration/it/each/each-options.test.ts b/test/integration/it/each/each-options.test.ts index 91a7bd9c..01121aff 100644 --- a/test/integration/it/each/each-options.test.ts +++ b/test/integration/it/each/each-options.test.ts @@ -1,7 +1,7 @@ +import { assert } from '../../../../src/modules/essentials/assert.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../../../src/modules/helpers/each.js'; import { it } from '../../../../src/modules/helpers/it/core.js'; -import { assert } from '../../../../src/modules/essentials/assert.js'; -import { beforeEach, afterEach } from '../../../../src/modules/helpers/each.js'; let counter = 0; diff --git a/test/integration/it/it.test.ts b/test/integration/it/it.test.ts index 1bca9dd3..7114c582 100644 --- a/test/integration/it/it.test.ts +++ b/test/integration/it/it.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { describe } from '../../../src/modules/helpers/describe.js'; import { it } from '../../../src/modules/helpers/it/core.js'; +import { test } from '../../../src/modules/helpers/test.js'; test('Testing "it" overloads', () => { describe(async () => { diff --git a/test/integration/strict/assert-no-message.test.ts b/test/integration/strict/assert-no-message.test.ts index e40e6130..5dafa9bc 100644 --- a/test/integration/strict/assert-no-message.test.ts +++ b/test/integration/strict/assert-no-message.test.ts @@ -1,8 +1,8 @@ -import { skip } from '../../../src/modules/helpers/skip.js'; -import { runtimeVersion } from '../../../src/parsers/runtime-version.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { describe } from '../../../src/modules/helpers/describe.js'; import { it } from '../../../src/modules/helpers/it/core.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { skip } from '../../../src/modules/helpers/skip.js'; +import { runtimeVersion } from '../../../src/parsers/runtime-version.js'; const { runtime } = GLOBAL; diff --git a/test/integration/strict/assert.test.ts b/test/integration/strict/assert.test.ts index acc3d6b2..08046157 100644 --- a/test/integration/strict/assert.test.ts +++ b/test/integration/strict/assert.test.ts @@ -1,8 +1,8 @@ +import { GLOBAL } from '../../../src/configs/poku.js'; import { describe } from '../../../src/modules/helpers/describe.js'; import { it } from '../../../src/modules/helpers/it/core.js'; import { skip } from '../../../src/modules/helpers/skip.js'; import { runtimeVersion } from '../../../src/parsers/runtime-version.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; if (GLOBAL.runtime === 'deno') skip(); if (GLOBAL.runtime === 'node' && runtimeVersion < 16) diff --git a/test/integration/strict/ensure-strict.test.ts b/test/integration/strict/ensure-strict.test.ts index 2bef4baf..1b02c968 100644 --- a/test/integration/strict/ensure-strict.test.ts +++ b/test/integration/strict/ensure-strict.test.ts @@ -1,8 +1,8 @@ -import { skip } from '../../../src/modules/helpers/skip.js'; -import { describe } from '../../../src/modules/helpers/describe.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { describe } from '../../../src/modules/helpers/describe.js'; +import { skip } from '../../../src/modules/helpers/skip.js'; import { runtimeVersion } from '../../../src/parsers/runtime-version.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; if (GLOBAL.runtime !== 'node') skip(); if (runtimeVersion < 16) skip('Strict method is available from Node.js 16'); diff --git a/test/integration/test/each/each-options-promise.test.ts b/test/integration/test/each/each-options-promise.test.ts index d678cb22..45d06df7 100644 --- a/test/integration/test/each/each-options-promise.test.ts +++ b/test/integration/test/each/each-options-promise.test.ts @@ -1,7 +1,7 @@ +import { assert } from '../../../../src/modules/essentials/assert.js'; import { describe } from '../../../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../../../src/modules/helpers/each.js'; import { test } from '../../../../src/modules/helpers/test.js'; -import { assert } from '../../../../src/modules/essentials/assert.js'; -import { beforeEach, afterEach } from '../../../../src/modules/helpers/each.js'; let counter = 0; diff --git a/test/integration/test/each/each-options.test.ts b/test/integration/test/each/each-options.test.ts index f34556c6..b9f3d7a2 100644 --- a/test/integration/test/each/each-options.test.ts +++ b/test/integration/test/each/each-options.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../../../src/modules/helpers/test.js'; import { assert } from '../../../../src/modules/essentials/assert.js'; -import { beforeEach, afterEach } from '../../../../src/modules/helpers/each.js'; +import { afterEach, beforeEach } from '../../../../src/modules/helpers/each.js'; +import { test } from '../../../../src/modules/helpers/test.js'; test('Before and After Each Suite (test)', () => { let counter = 0; diff --git a/test/integration/wait-for/wait-for-port.test.ts b/test/integration/wait-for/wait-for-port.test.ts index 36696e72..657ff7d1 100644 --- a/test/integration/wait-for/wait-for-port.test.ts +++ b/test/integration/wait-for/wait-for-port.test.ts @@ -1,9 +1,10 @@ -import { createServer, type Server } from 'node:http'; -import { test } from '../../../src/modules/helpers/test.js'; -import { it } from '../../../src/modules/helpers/it/core.js'; +import type { Server } from 'node:http'; +import { createServer } from 'node:http'; import { assert } from '../../../src/modules/essentials/assert.js'; -import { waitForPort } from '../../../src/modules/helpers/wait-for.js'; +import { it } from '../../../src/modules/helpers/it/core.js'; import { kill } from '../../../src/modules/helpers/kill.js'; +import { test } from '../../../src/modules/helpers/test.js'; +import { waitForPort } from '../../../src/modules/helpers/wait-for.js'; const startServer = (port: number): Promise => new Promise((resolve) => { diff --git a/test/unit/args.test.ts b/test/unit/args.test.ts index 8166ba12..f0b75125 100644 --- a/test/unit/args.test.ts +++ b/test/unit/args.test.ts @@ -1,11 +1,11 @@ +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { - getArg, - hasArg, argToArray, + getArg, getPaths, + hasArg, } from '../../src/parsers/get-arg.js'; describe('CLI Argument Handling Functions', () => { diff --git a/test/unit/assert-find-file.test.ts b/test/unit/assert-find-file.test.ts index 45c0c490..25ee2460 100644 --- a/test/unit/assert-find-file.test.ts +++ b/test/unit/assert-find-file.test.ts @@ -1,5 +1,5 @@ -import { test } from '../../src/modules/helpers/test.js'; import { assert } from '../../src/modules/essentials/assert.js'; +import { test } from '../../src/modules/helpers/test.js'; import { findFile } from '../../src/parsers/find-file-from-stack.js'; const setStack = (stack?: string): Error => { diff --git a/test/unit/assert-result-type.test.ts b/test/unit/assert-result-type.test.ts index f16bcdaa..44fcd063 100644 --- a/test/unit/assert-result-type.test.ts +++ b/test/unit/assert-result-type.test.ts @@ -1,5 +1,5 @@ -import { test } from '../../src/modules/helpers/test.js'; import { assert } from '../../src/modules/essentials/assert.js'; +import { test } from '../../src/modules/helpers/test.js'; import { parseResultType } from '../../src/parsers/assert.js'; test('Assert: Parse Result Type', async () => { diff --git a/test/unit/define-configs.test.ts b/test/unit/define-configs.test.ts index 241b8c80..7131b39a 100644 --- a/test/unit/define-configs.test.ts +++ b/test/unit/define-configs.test.ts @@ -1,6 +1,6 @@ -import { test } from '../../src/modules/helpers/test.js'; -import { skip } from '../../src/modules/helpers/skip.js'; import { GLOBAL } from '../../src/configs/poku.js'; +import { skip } from '../../src/modules/helpers/skip.js'; +import { test } from '../../src/modules/helpers/test.js'; if (GLOBAL.runtime === 'deno') skip(); diff --git a/test/unit/deno/allow.test.ts b/test/unit/deno/allow.test.ts index 6eb8f122..4490bd72 100644 --- a/test/unit/deno/allow.test.ts +++ b/test/unit/deno/allow.test.ts @@ -1,8 +1,8 @@ -import { test } from '../../../src/modules/helpers/test.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; -import { runner } from '../../../src/parsers/get-runner.js'; import { skip } from '../../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { test } from '../../../src/modules/helpers/test.js'; +import { runner } from '../../../src/parsers/get-runner.js'; const { runtime } = GLOBAL; diff --git a/test/unit/deno/cjs.test.ts b/test/unit/deno/cjs.test.ts index 7fb1668e..9f6d922e 100644 --- a/test/unit/deno/cjs.test.ts +++ b/test/unit/deno/cjs.test.ts @@ -1,9 +1,9 @@ -import process from 'node:process'; import { spawn } from 'node:child_process'; -import { test } from '../../../src/modules/helpers/test.js'; +import process from 'node:process'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; import { skip } from '../../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { test } from '../../../src/modules/helpers/test.js'; const { runtime } = GLOBAL; diff --git a/test/unit/deno/deny.test.ts b/test/unit/deno/deny.test.ts index 500516d9..305c55e2 100644 --- a/test/unit/deno/deny.test.ts +++ b/test/unit/deno/deny.test.ts @@ -1,8 +1,8 @@ -import { test } from '../../../src/modules/helpers/test.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; -import { runner } from '../../../src/parsers/get-runner.js'; import { skip } from '../../../src/modules/helpers/skip.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; +import { test } from '../../../src/modules/helpers/test.js'; +import { runner } from '../../../src/parsers/get-runner.js'; const { runtime } = GLOBAL; diff --git a/test/unit/env-services.test.ts b/test/unit/env-services.test.ts index 2781a59a..a44bd103 100644 --- a/test/unit/env-services.test.ts +++ b/test/unit/env-services.test.ts @@ -1,9 +1,9 @@ +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { - removeComments, parseEnvLine, + removeComments, resolveEnvVariables, } from '../../src/services/env.js'; diff --git a/test/unit/logs.test.ts b/test/unit/logs.test.ts index 3485b76f..46107d0d 100644 --- a/test/unit/logs.test.ts +++ b/test/unit/logs.test.ts @@ -1,11 +1,11 @@ import process from 'node:process'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; +import { beforeEach } from '../../src/modules/helpers/each.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { parserOutput } from '../../src/parsers/output.js'; import { log } from '../../src/services/write.js'; -import { GLOBAL } from '../../src/configs/poku.js'; -import { beforeEach } from '../../src/modules/helpers/each.js'; beforeEach(() => { GLOBAL.configs.debug = undefined; diff --git a/test/unit/map-tests.test.ts b/test/unit/map-tests.test.ts index 37b73f94..cf5aa2dd 100644 --- a/test/unit/map-tests.test.ts +++ b/test/unit/map-tests.test.ts @@ -1,10 +1,10 @@ +import { mkdirSync, rmSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; -import { writeFileSync, mkdirSync, rmSync } from 'node:fs'; -import { test } from '../../src/modules/helpers/test.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../src/modules/helpers/each.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { beforeEach, afterEach } from '../../src/modules/helpers/each.js'; -import { assert } from '../../src/modules/essentials/assert.js'; +import { test } from '../../src/modules/helpers/test.js'; import { findMatchingFiles, getDeepImports, diff --git a/test/unit/parse-callbacks.test.ts b/test/unit/parse-callbacks.test.ts index 25b9bfe4..53bbc3d1 100644 --- a/test/unit/parse-callbacks.test.ts +++ b/test/unit/parse-callbacks.test.ts @@ -1,8 +1,8 @@ +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; -import { test } from '../../src/modules/helpers/test.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; -import { checkOnly, CheckNoOnly } from '../../src/parsers/callback.js'; +import { test } from '../../src/modules/helpers/test.js'; +import { CheckNoOnly, checkOnly } from '../../src/parsers/callback.js'; const cbWithOnly = { function: function cb() { diff --git a/test/unit/run-test-file.test.ts b/test/unit/run-test-file.test.ts index 886a7163..1fe5fa87 100644 --- a/test/unit/run-test-file.test.ts +++ b/test/unit/run-test-file.test.ts @@ -1,9 +1,9 @@ +import { ext } from '../__utils__/capture-cli.test.js'; +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { runTestFile } from '../../src/services/run-test-file.js'; -import { ext } from '../__utils__/capture-cli.test.js'; -import { GLOBAL } from '../../src/configs/poku.js'; GLOBAL.configs.quiet = true; diff --git a/test/unit/run-tests.test.ts b/test/unit/run-tests.test.ts index 8d47618e..0afc249f 100644 --- a/test/unit/run-tests.test.ts +++ b/test/unit/run-tests.test.ts @@ -1,8 +1,8 @@ +import { GLOBAL } from '../../src/configs/poku.js'; +import { assert } from '../../src/modules/essentials/assert.js'; import { describe } from '../../src/modules/helpers/describe.js'; import { it } from '../../src/modules/helpers/it/core.js'; -import { assert } from '../../src/modules/essentials/assert.js'; import { runTests } from '../../src/services/run-tests.js'; -import { GLOBAL } from '../../src/configs/poku.js'; GLOBAL.configs.noExit = true; GLOBAL.configs.quiet = true; diff --git a/test/unit/wait-for/sleep.test.ts b/test/unit/wait-for/sleep.test.ts index 6b77340a..3bab770c 100644 --- a/test/unit/wait-for/sleep.test.ts +++ b/test/unit/wait-for/sleep.test.ts @@ -1,5 +1,5 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { test } from '../../../src/modules/helpers/test.js'; import { sleep } from '../../../src/modules/helpers/wait-for.js'; test('Sleep "mini" helper', async () => { diff --git a/test/unit/wait-for/wait-for-expected-result.test.ts b/test/unit/wait-for/wait-for-expected-result.test.ts index 97699f8f..5feb8999 100644 --- a/test/unit/wait-for/wait-for-expected-result.test.ts +++ b/test/unit/wait-for/wait-for-expected-result.test.ts @@ -1,7 +1,7 @@ -import { test } from '../../../src/modules/helpers/test.js'; +import { GLOBAL } from '../../../src/configs/poku.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { test } from '../../../src/modules/helpers/test.js'; import { waitForExpectedResult } from '../../../src/modules/helpers/wait-for.js'; -import { GLOBAL } from '../../../src/configs/poku.js'; test('Wait For Expected Result', async () => { const { runtime } = GLOBAL; diff --git a/test/unit/wait-for/wait-for-trhows.test.ts b/test/unit/wait-for/wait-for-trhows.test.ts index c70b4c63..6975fe81 100644 --- a/test/unit/wait-for/wait-for-trhows.test.ts +++ b/test/unit/wait-for/wait-for-trhows.test.ts @@ -1,5 +1,5 @@ -import { test } from '../../../src/modules/helpers/test.js'; import { assert } from '../../../src/modules/essentials/assert.js'; +import { test } from '../../../src/modules/helpers/test.js'; import { sleep, waitForExpectedResult, diff --git a/test/unit/watch.test.ts b/test/unit/watch.test.ts index e9ca0f94..92253b21 100644 --- a/test/unit/watch.test.ts +++ b/test/unit/watch.test.ts @@ -1,15 +1,15 @@ +import type { WatchCallback } from '../../src/@types/watch.js'; import fs from 'node:fs'; import path from 'node:path'; -import { it } from '../../src/modules/helpers/it/core.js'; -import { describe } from '../../src/modules/helpers/describe.js'; -import { beforeEach, afterEach } from '../../src/modules/helpers/each.js'; +import { GLOBAL } from '../../src/configs/poku.js'; import { assert } from '../../src/modules/essentials/assert.js'; -import { watch } from '../../src/services/watch.js'; -import { sleep } from '../../src/modules/helpers/wait-for.js'; +import { describe } from '../../src/modules/helpers/describe.js'; +import { afterEach, beforeEach } from '../../src/modules/helpers/each.js'; +import { it } from '../../src/modules/helpers/it/core.js'; import { skip } from '../../src/modules/helpers/skip.js'; -import type { WatchCallback } from '../../src/@types/watch.js'; +import { sleep } from '../../src/modules/helpers/wait-for.js'; import { runtimeVersion } from '../../src/parsers/runtime-version.js'; -import { GLOBAL } from '../../src/configs/poku.js'; +import { watch } from '../../src/services/watch.js'; const { runtime } = GLOBAL; diff --git a/tools/build/c8-file.ts b/tools/build/c8-file.ts index 76ad0559..8a7e43ed 100644 --- a/tools/build/c8-file.ts +++ b/tools/build/c8-file.ts @@ -1,5 +1,5 @@ -import { platform } from 'node:os'; import { readFile, writeFile } from 'node:fs/promises'; +import { platform } from 'node:os'; import { JSONC } from 'jsonc.min'; (async () => { diff --git a/website/.prettierrc b/website/.prettierrc index be55ae48..c08c56c0 100644 --- a/website/.prettierrc +++ b/website/.prettierrc @@ -20,6 +20,26 @@ "options": { "trailingComma": "none" } + }, + { + "files": "*.{ts,tsx}", + "options": { + "plugins": ["@ianvs/prettier-plugin-sort-imports"], + "importOrder": [ + "^(node:)", + "", + "^[.]", + "", + "^react$", + "^@docusaurus", + "^@theme", + "", + "^@site", + "^[.]", + "", + ".scss$" + ] + } } ] } diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index e766f33d..6d5e3d4c 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -1,5 +1,5 @@ -import type { Config } from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; +import type { Config } from '@docusaurus/types'; import { themes as prismThemes } from 'prism-react-renderer'; const config: Config = { diff --git a/website/package-lock.json b/website/package-lock.json index 456016a1..1c0d9974 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -30,6 +30,7 @@ "@docusaurus/module-type-aliases": "^3.7.0", "@docusaurus/tsconfig": "^3.7.0", "@docusaurus/types": "^3.7.0", + "@ianvs/prettier-plugin-sort-imports": "^4.4.1", "@types/node": "^22.12.0", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", @@ -4419,6 +4420,29 @@ "devOptional": true, "license": "BSD-3-Clause" }, + "node_modules/@ianvs/prettier-plugin-sort-imports": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@ianvs/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.4.1.tgz", + "integrity": "sha512-F0/Hrcfpy8WuxlQyAWJTEren/uxKhYonOGY4OyWmwRdeTvkh9mMSCxowZLjNkhwi/2ipqCgtXwwOk7tW0mWXkA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "^7.26.2", + "@babel/parser": "^7.26.2", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "semver": "^7.5.2" + }, + "peerDependencies": { + "@vue/compiler-sfc": "2.7.x || 3.x", + "prettier": "2 || 3" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", diff --git a/website/package.json b/website/package.json index a3507586..d53f34f5 100644 --- a/website/package.json +++ b/website/package.json @@ -44,6 +44,7 @@ "@docusaurus/module-type-aliases": "^3.7.0", "@docusaurus/tsconfig": "^3.7.0", "@docusaurus/types": "^3.7.0", + "@ianvs/prettier-plugin-sort-imports": "^4.4.1", "@types/node": "^22.12.0", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", diff --git a/website/src/components/Confetti.tsx b/website/src/components/Confetti.tsx index b88cf9e2..b5ece579 100644 --- a/website/src/components/Confetti.tsx +++ b/website/src/components/Confetti.tsx @@ -1,5 +1,5 @@ +import React, { useRef, useState } from 'react'; import { Copy } from 'lucide-react'; -import React, { useState, useRef } from 'react'; import Confetti from 'react-confetti'; import { toast } from 'sonner'; diff --git a/website/src/components/Stability.tsx b/website/src/components/Stability.tsx index 0e8f2f12..6781f2d6 100644 --- a/website/src/components/Stability.tsx +++ b/website/src/components/Stability.tsx @@ -4,8 +4,8 @@ import { Lightbulb, LightbulbOff, Microscope, - PackageSearch, PackageCheck, + PackageSearch, } from 'lucide-react'; export type StabilityProps = { diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index f3e1048d..fca21a4a 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,8 +1,6 @@ -import Link from '@docusaurus/Link'; import Head from '@docusaurus/Head'; +import Link from '@docusaurus/Link'; import Heading from '@theme/Heading'; -import { ReactTyped } from 'react-typed'; -import { ConfettiButton } from '@site/src/components/Confetti'; import { Album, DatabaseZap, @@ -13,19 +11,20 @@ import { PiggyBank, Plus, } from 'lucide-react'; +import { ReactTyped } from 'react-typed'; +import { ConfettiButton } from '@site/src/components/Confetti'; +import Bun from '@site/static/img/bun.svg'; +import Deno from '@site/static/img/deno.svg'; import Junior from '@site/static/img/junior.svg'; +import Maintainer from '@site/static/img/maintainer.svg'; import MidLevel from '@site/static/img/mid-level.svg'; +import NodeJS from '@site/static/img/node-js.svg'; +import NPM from '@site/static/img/npm.svg'; import Senior from '@site/static/img/senior.svg'; -import Maintainer from '@site/static/img/maintainer.svg'; import Silhouette from '@site/static/img/silhouette-darker.svg'; import SilhouetteOriginal from '@site/static/img/silhouette.svg'; -import NPM from '@site/static/img/npm.svg'; -import NodeJS from '@site/static/img/node-js.svg'; import TypeScript from '@site/static/img/typescript.svg'; -import Bun from '@site/static/img/bun.svg'; -import Deno from '@site/static/img/deno.svg'; -// Asserts import '@site/src/css/home.scss'; import '@site/src/css/features.scss'; diff --git a/website/test/unit/check-extensions.test.ts b/website/test/unit/check-extensions.test.ts index 5b75aba0..f4559525 100644 --- a/website/test/unit/check-extensions.test.ts +++ b/website/test/unit/check-extensions.test.ts @@ -1,4 +1,4 @@ -import { listFiles, test, strict } from 'poku'; +import { listFiles, strict, test } from 'poku'; const invalidFiles: string[] = []; const message = [