| 511 | }); |
| 512 | |
| 513 | function done(answer) { |
| 514 | var duration = Date.now() - start; |
| 515 | t.is(fsm.state, 'complete') |
| 516 | t.is(duration > 600, true) |
| 517 | t.deepEqual(logger.log, [ |
| 518 | { event: 'onBeforeTransition', transition: 'step', from: 'none', to: 'complete', current: 'none', args: [ 'additional', 'arguments' ] }, |
| 519 | { event: 'onBeforeStep', transition: 'step', from: 'none', to: 'complete', current: 'none', args: [ 'additional', 'arguments' ] }, |
| 520 | { event: 'onLeaveState', transition: 'step', from: 'none', to: 'complete', current: 'none', args: [ 'additional', 'arguments' ] }, |
| 521 | { event: 'onLeaveNone', transition: 'step', from: 'none', to: 'complete', current: 'none', args: [ 'additional', 'arguments' ] }, |
| 522 | { event: 'onTransition', transition: 'step', from: 'none', to: 'complete', current: 'none', args: [ 'additional', 'arguments' ] }, |
| 523 | { event: 'onEnterState', transition: 'step', from: 'none', to: 'complete', current: 'complete', args: [ 'additional', 'arguments' ] }, |
| 524 | { event: 'onEnterComplete', transition: 'step', from: 'none', to: 'complete', current: 'complete', args: [ 'additional', 'arguments' ] }, |
| 525 | { event: 'onAfterTransition', transition: 'step', from: 'none', to: 'complete', current: 'complete', args: [ 'additional', 'arguments' ] }, |
| 526 | { event: 'onAfterStep', transition: 'step', from: 'none', to: 'complete', current: 'complete', args: [ 'additional', 'arguments' ] }, |
| 527 | ]) |
| 528 | t.is(answer, 'resolved'); |
| 529 | resolveTest() |
| 530 | } |
| 531 | |
| 532 | fsm.step('additional', 'arguments') |
| 533 | .then(done); |