Optionalkind: "list"Narrow a ComplyTestControllerResponse to its success arm and optionally
assert which success shape it is ('list', 'transition', or 'simulation').
Throws when the response is an error or when the arm doesn't match.
Returns the narrowed success value so callers skip the if (result.success)
boilerplate and access arm-specific fields directly.
const result = await handleTestControllerRequest(store, {
scenario: 'force_account_status',
params: { account_id: 'acct-1', status: 'suspended' },
});
const ok = expectControllerSuccess(result, 'transition');
assert.strictEqual(ok.current_state, 'suspended');
Narrow a ComplyTestControllerResponse to its success arm and optionally
assert which success shape it is ('list', 'transition', or 'simulation').
Throws when the response is an error or when the arm doesn't match.
Returns the narrowed success value so callers skip the if (result.success)
boilerplate and access arm-specific fields directly.
const result = await handleTestControllerRequest(store, {
scenario: 'force_account_status',
params: { account_id: 'acct-1', status: 'suspended' },
});
const ok = expectControllerSuccess(result, 'transition');
assert.strictEqual(ok.current_state, 'suspended');
Narrow a ComplyTestControllerResponse to its success arm and optionally
assert which success shape it is ('list', 'transition', or 'simulation').
Throws when the response is an error or when the arm doesn't match.
Returns the narrowed success value so callers skip the if (result.success)
boilerplate and access arm-specific fields directly.
const result = await handleTestControllerRequest(store, {
scenario: 'force_account_status',
params: { account_id: 'acct-1', status: 'suspended' },
});
const ok = expectControllerSuccess(result, 'transition');
assert.strictEqual(ok.current_state, 'suspended');
Narrow to the SeedSuccess arm (3.0.1+ message-only seed acknowledgement).
Every seed_* scenario returns SeedSuccess ({ success: true, message? })
— both responses produced by the SDK's own dispatchSeed and responses
from third-party sellers. Force_* scenarios continue to return
StateTransitionSuccess (previous_state / current_state) under
kind: 'transition'.
Narrow a ComplyTestControllerResponse to its success arm and optionally
assert which success shape it is ('list', 'transition', or 'simulation').
Throws when the response is an error or when the arm doesn't match.
Returns the narrowed success value so callers skip the if (result.success)
boilerplate and access arm-specific fields directly.
const result = await handleTestControllerRequest(store, {
scenario: 'force_account_status',
params: { account_id: 'acct-1', status: 'suspended' },
});
const ok = expectControllerSuccess(result, 'transition');
assert.strictEqual(ok.current_state, 'suspended');
Narrow a
ComplyTestControllerResponseto its success arm and optionally assert which success shape it is ('list','transition', or'simulation'). Throws when the response is an error or when the arm doesn't match.Returns the narrowed success value so callers skip the
if (result.success)boilerplate and access arm-specific fields directly.