Set Runtime.currentStepTime to a number by default instead of null

This commit is contained in:
Thomas Weber committed 2022-07-09 16:28:28 -05:00
1 parent 3062334108
commit c4fa4a84a8
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -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();
+7
View File
@@ -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();
});