WRITE UNIT TESTS!!!

first async command working, no unit tests done AGAING
This commit is contained in:
2026-08-23 06:39:37 +02:00
parent e313aa5b9d
commit 268729bb62
18 changed files with 331 additions and 93 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
import type { CommandDescriptor, CommandOutput } from "@core/command";
import type { CommandIO } from "@core/command_io";
import type { FileSystem } from "@core/filesystem/filesystem";
import { createErrorResult, createSuccessResult } from "@core/result";
import { getCurrentSession } from "@core/session_manager";
@@ -14,7 +15,12 @@ import { resolveInode, resolvePath } from "@core/util/path_resolver";
export const COMMAND_NAME = "cd";
function main(state: ShellState, __flags: string[], args: string[]): CommandOutput<ShellError> {
async function main(
__io: CommandIO,
state: ShellState,
__flags: string[],
args: string[],
): Promise<CommandOutput<ShellError>> {
if (args.length > 1) {
return {
state,