Skip to content

Commit

Permalink
feat(cambion): add state to be consistent (#427)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt <[email protected]>
  • Loading branch information
Neppkun and TobiTenno authored Dec 29, 2022
1 parent 129e2b6 commit e459556
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/CambionCycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module.exports = class CambionCycle extends WorldstateObject {

({ activation: this.activation, expiry: this.expiry, timeLeft: this.timeLeft } = cetusCycle);

this.active = cetusCycle.isDay ? 'fass' : 'vome';
this.state = cetusCycle.isDay ? 'fass' : 'vome';
this.active = this.state;

this.id = `cambionCycle${this.expiry.getTime()}`;
}
Expand Down
2 changes: 2 additions & 0 deletions test/unit/cambion.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('CambionCycle', function () {
);

should.equal(cycle.active, 'fass');
should.equal(cycle.state, 'fass');
});

it('should show vome for night', () => {
Expand All @@ -63,6 +64,7 @@ describe('CambionCycle', function () {
);

should.equal(cycle.active, 'vome');
should.equal(cycle.state, 'vome');
});
});
});

0 comments on commit e459556

Please sign in to comment.