Permalink
Browse files

passing of runMachine args added

  • Loading branch information...
JanTrotnow committed Jan 7, 2019
1 parent 7db29f1 commit 0e544cf7957c7807fee09ac723e572c49bac8d8f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/spec-helper.ts
@@ -158,7 +158,7 @@ export class SpecHelper {
* Runs state machine. Needs created request scope!
* @param stateName Name of state to run.
*/
public async runMachine(stateName: string): Promise<void> {
public async runMachine(stateName: string, ...args): Promise<void> {
this.throwIfNoRequestScope();

// Transition to given state
@@ -174,7 +174,7 @@ export class SpecHelper {
);
const runner = afterContextExtensions.filter(extensionClass => extensionClass.constructor.name === "Runner")[0];

return runner.execute();
return runner.execute(...args);
}

/**

0 comments on commit 0e544cf

Please sign in to comment.