diff --git a/src/config.js b/src/config.js index 65e0d35..0b723ac 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,6 @@ const config = { - 'workflow_read_token': 'WORKFLOW_READ_TOKEN - DO NOT SPECIFY - POPULATED AUTOMATICALLY' + 'workflow_read_token': 'WORKFLOW_READ_TOKEN - DO NOT SPECIFY - POPULATED AUTOMATICALLY', + 'updateCellMinutes': 10 } module.exports = { config } diff --git a/src/triggers.js b/src/triggers.js index 69d8ab5..47b100e 100644 --- a/src/triggers.js +++ b/src/triggers.js @@ -8,6 +8,6 @@ function deleteAllTriggers() { } function createTriggers() { - const minutes = 10 + const minutes = config.updateCellMinutes ScriptApp.newTrigger('updateRunsConfigC2Cell').timeBased().everyMinutes(minutes).create() } diff --git a/test/config.test.js b/test/config.test.js index 1e1fe33..a39f920 100644 --- a/test/config.test.js +++ b/test/config.test.js @@ -1,5 +1,9 @@ const { config } = require('../src/config') -test('config has placeholder values', () => { +test('config.workflow_read_token has placeholder value', () => { expect(config.workflow_read_token).toBe('WORKFLOW_READ_TOKEN - DO NOT SPECIFY - POPULATED AUTOMATICALLY') }) + +test('config.updateCellMinutes is defined', () => { + expect(config.updateCellMinutes).toBeDefined() +})