Skip to main content

Class: CubistTestDK

Wrapper for TestDK specific to Cubist, eliding the need for (1) a type parameter and (2) passing Cubist as an argument.

Example

Testing already-built (and deployed) project.

const testdk = new CubistTestDK();

Hierarchy

Exports

Constructors

Accessors

Methods

Constructors

constructor

new CubistTestDK(options?)

Create new instance of CubistTestDK.

Parameters

NameType
options?TestDKOptions

Overrides

TestDK.constructor

Defined in

submodules/cubist-node-sdk/src/test.ts:330

Accessors

config

get config(): Config

Get the underlying config.

Returns

Config

Inherited from

TestDK.config

Defined in

submodules/cubist-node-sdk/src/test.ts:203


cubist

get cubist(): T

Get the cubist project we're testing.

::: warning Whenever you use TestDK, you should always use this accessors to get a reference to the Cubist project. Creating a new Cubist object could have unwanted behavior. Here is an example how things can go wrong: :::

const testdk = new TestDK<CubistORM>(CubistORM, { tmp_deploy_dir: true });
const cubist = testdk.cubist; // this is correct

const bad_cubist = new Cubist(); // this is not what you want; the deploy
// directory for this project is the deploy directory specified in the config
// that is:
assert(cubist.config.build_dir() != bad_cubist.config.build_dir());

Returns

T

Inherited from

TestDK.cubist

Defined in

submodules/cubist-node-sdk/src/test.ts:198

Methods

build

build(): Promise<void>

Build project, i.e., run cubist build

Returns

Promise<void>

Inherited from

TestDK.build

Defined in

submodules/cubist-node-sdk/src/test.ts:287


emptyDeployDir

emptyDeployDir(): Promise<void>

Clobber the project deploy directory.

Returns

Promise<void>

Inherited from

TestDK.emptyDeployDir

Defined in

submodules/cubist-node-sdk/src/test.ts:292


startService

startService(service?): Promise<void>

Start particular service (or all)---namely chains and relayer---with cubist start.

Parameters

NameTypeDescription
service?ServiceService to start.

Returns

Promise<void>

Inherited from

TestDK.startService

Defined in

submodules/cubist-node-sdk/src/test.ts:247


stopService

stopService(service?): Promise<void>

Stop particular service (or all)---namely chains and relayer---with cubist start.

Parameters

NameTypeDescription
service?ServiceService to stop.

Returns

Promise<void>

Inherited from

TestDK.stopService

Defined in

submodules/cubist-node-sdk/src/test.ts:272


stopServiceOnExit

stopServiceOnExit(service?): void

Stop service(s) on process exit.

Parameters

NameTypeDescription
service?ServiceService to stop.

Returns

void

Inherited from

TestDK.stopServiceOnExit

Defined in

submodules/cubist-node-sdk/src/test.ts:300