Skip to content

Commit

Permalink
study iso8601-duration readme and make changes accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
paed01 committed Jan 8, 2021
1 parent fc8340d commit 9c7188f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"chai": "^4.2.0",
"chronokinesis": "^3.0.0",
"debug": "^4.3.1",
"eslint": "^7.16.0",
"eslint": "^7.17.0",
"got": "^11.8.1",
"mocha": "^8.2.1",
"mocha-cakes-2": "^3.3.0",
Expand Down
8 changes: 6 additions & 2 deletions test/eventDefinitions/TimerEventDefinition-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,16 +1093,19 @@ describe('TimerEventDefinition', () => {
});

it('completes when time date is due', (done) => {
ck.reset();

const definition = TimerEventDefinition(event, {
type: 'bpmn:TimerEventDefinition',
behaviour: {
timeDuration: 'PT1Y',
timeDate: new Date(Date.now() + 100).toISOString(),
timeDuration: 'P1Y',
timeDate: new Date(Date.now() + 150).toISOString(),
timeCycle: 'R3/PT10H',
},
});

event.broker.subscribeTmp('execution', 'execute.completed', (_, msg) => {
expect(msg.content).to.have.property('timerType', 'timeDate');
expect(msg.content).to.have.property('runningTime').that.is.above(0);
done();
}, {noAck: true});
Expand Down Expand Up @@ -1135,6 +1138,7 @@ describe('TimerEventDefinition', () => {
});

event.broker.subscribeTmp('execution', 'execute.completed', (_, msg) => {
expect(msg.content).to.have.property('timerType', 'timeDuration');
expect(msg.content).to.have.property('runningTime').that.is.above(0);
done();
}, {noAck: true});
Expand Down

0 comments on commit 9c7188f

Please sign in to comment.