Skip to content

@pumpkin-plugins/plugin-kit API / testing/fake-commands / FakeNode

Class: FakeNode ​

Defined in: tools/plugin-kit/src/testing/fake-commands.ts:5

A node of a fake command tree, with what was attached to it.

Implements ​

Constructors ​

Constructor ​

new FakeNode(name, argument?): FakeNode

Defined in: tools/plugin-kit/src/testing/fake-commands.ts:12

Creates a node for the word name.

Parameters ​

name ​

string

argument? ​

CommandArgumentSpec

Returns ​

FakeNode

Methods ​

executeWithHandlerId() ​

executeWithHandlerId(id): void

Defined in: tools/plugin-kit/src/testing/fake-commands.ts:25

Makes the node runnable: the host calls the handler registered under this id.

Parameters ​

id ​

number

Returns ​

void

Implementation of ​

CommandNodeLike.executeWithHandlerId


then() ​

then(child): void

Defined in: tools/plugin-kit/src/testing/fake-commands.ts:18

Adds a child node and transfers ownership of that child to this node.

Parameters ​

child ​

CommandNodeLike

Returns ​

void

Implementation of ​

CommandNodeLike.then

Pumpkin Plugins documentation