From 1a8653c040fbf23cb36f381cc9400b25a4f48404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 24 Mar 2026 18:05:16 +0100 Subject: [PATCH] feat: add more test categories and prefix mappings --- util/category.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/util/category.ts b/util/category.ts index 488f1a7..08e458a 100644 --- a/util/category.ts +++ b/util/category.ts @@ -2,13 +2,17 @@ export const categories = [ "assert", + "async-hooks", "buffer", "child-process", "cluster", "console", "crypto", + "debugger", "dgram", + "diagnostics-channel", "dns", + "domain", "events", "fs", "http", @@ -20,18 +24,24 @@ export const categories = [ "os", "others", "path", + "perf-hooks", + "permission", "process", "promise", "querystring", "quic", "readline", "repl", + "sea", + "snapshot", "sqlite", "stdio", "stream", "string-decoder", + "test-runner", "timers", "tls", + "trace-events", "tty", "url", "util", @@ -48,15 +58,22 @@ export type Category = typeof categories[number]; const prefixToCategoryMap: Record = { "test-abortcontroller": "web", "test-assert": "assert", + "test-async-hooks": "async-hooks", + "test-async-local-storage": "async-hooks", + "test-async-wrap": "async-hooks", "test-blob": "web", "test-buffer": "buffer", + "test-build-sea": "sea", "test-child-process": "child-process", "test-cluster": "cluster", "test-console": "console", "test-crypto": "crypto", "test-cwd": "process", + "test-debugger": "debugger", "test-dgram": "dgram", + "test-diagnostics-channel": "diagnostics-channel", "test-dns": "dns", + "test-domain": "domain", "test-double-tls": "tls", "test-event": "events", "test-event-target": "web", @@ -78,7 +95,9 @@ const prefixToCategoryMap: Record = { "test-outgoing-message": "http", "test-os": "os", "test-path": "path", + "test-perf-hooks": "perf-hooks", "test-performance": "web", + "test-permission": "permission", "test-process": "process", "test-promise": "promise", "test-readable": "stream", @@ -87,7 +106,10 @@ const prefixToCategoryMap: Record = { "test-readline": "readline", "test-repl": "repl", "test-require": "module", + "test-runner": "test-runner", "test-shadow-realm": "web", + "test-single-executable": "sea", + "test-snapshot": "snapshot", "test-socket": "net", "test-sqlite": "sqlite", "test-stdin": "stdio", @@ -98,6 +120,7 @@ const prefixToCategoryMap: Record = { "test-tcp": "net", "test-timers": "timers", "test-tls": "tls", + "test-trace-events": "trace-events", "test-tty": "tty", "test-urlpattern": "web", "test-url": "url", @@ -122,6 +145,10 @@ export function getTestCategory(name: string): Category { return "tty"; } else if (dir === "module-hooks" || dir === "es-module") { return "module"; + } else if (dir === "sea") { + return "sea"; + } else if (dir === "test-runner") { + return "test-runner"; } const basename = name.split("/").pop()!;