Set Runtime.currentStepTime to a number by default instead of null
This commit is contained in:
1 parent
3062334108
commit
c4fa4a84a8
2 files changed
+8
-1
No files matched your search
@@ -321,7 +321,7 @@ class Runtime extends EventEmitter {
|
||||
* WORK_TIME.
|
||||
* @type {!number}
|
||||
*/
|
||||
this.currentStepTime = null;
|
||||
this.currentStepTime = 1000 / 30;
|
||||
|
||||
// Set an intial value for this.currentMSecs
|
||||
this.updateCurrentMSecs();
|
||||
|
||||
@@ -213,3 +213,10 @@ test('getNumberOfCloudVariables', t => {
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('currentStepTime default value', t => {
|
||||
const rt = new Runtime();
|
||||
t.type(rt.currentStepTime, 'number');
|
||||
t.ok(rt.currentStepTime > 0);
|
||||
t.end();
|
||||
});
|
||||
Reference in new issue
Block a user