WRITE UNIT TESTS!!!
first async command working, no unit tests done AGAING
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user