Skip to content

Commit

Permalink
feat: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeignan1 committed Sep 27, 2023
1 parent 4c66a22 commit 163aaa1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/nodes/decorators/While.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ describe('While', function () {

it('latches', function () {
const testAction = new TestAction('testAction', [
{ rc: rc.RUNNING, inc: false },
{ rc: rc.SUCCESS, inc: true },
{ rc: rc.RUNNING, inc: true },
{ rc: rc.SUCCESS, inc: false },
]);

const uut = new decorators.While<TestState, number>(
Expand All @@ -129,17 +129,17 @@ describe('While', function () {

let result = uut.handleEvent(state, 0);
assert.strictEqual(rc.RUNNING, result);
assert.strictEqual(state.counter, 0);
assert.strictEqual(state.counter, 1);
assert.strictEqual(testAction.eventCount, 1);

result = uut.handleEvent(state, 0);
assert.strictEqual(rc.RUNNING, result);
assert.strictEqual(state.counter, 1);
assert.strictEqual(state.counter, 2);
assert.strictEqual(testAction.eventCount, 3);

result = uut.handleEvent(state, 0);
assert.strictEqual(rc.RUNNING, result);
assert.strictEqual(state.counter, 2);
assert.strictEqual(state.counter, 3);
assert.strictEqual(testAction.eventCount, 5);

result = uut.handleEvent(state, 0);
Expand Down

0 comments on commit 163aaa1

Please sign in to comment.