From af3c7842e7c5788a96e31f1c3162af92aa7d61e0 Mon Sep 17 00:00:00 2001 From: ciatph Date: Wed, 28 Aug 2024 23:50:34 +0800 Subject: [PATCH 1/7] wip: test custom and local paghasa regions settings on separate files --- .../classInitialization/customSettings.js | 73 +++++++++++ .../classInitialization/defaultSettings.js | 69 ++++++++++ .../classInitialization/fileLoading.js | 120 ------------------ app/jest.config.js | 3 + 4 files changed, 145 insertions(+), 120 deletions(-) create mode 100644 app/__tests__/classInitialization/customSettings.js create mode 100644 app/__tests__/classInitialization/defaultSettings.js delete mode 100644 app/__tests__/classInitialization/fileLoading.js diff --git a/app/__tests__/classInitialization/customSettings.js b/app/__tests__/classInitialization/customSettings.js new file mode 100644 index 0000000..efb6f7e --- /dev/null +++ b/app/__tests__/classInitialization/customSettings.js @@ -0,0 +1,73 @@ +require('dotenv').config() +const path = require('path') + +const ExcelFile = require('../../src/classes/excel') +const ExcelFactory = require('../../src/classes/excelfactory') +const ColorLog = require('../../src/classes/colorlog') +const logger = new ColorLog({ isBold: true }) + +const checkClass = require('./checkClass') +const config = require('./config.json') + +// Classes loading the default local 10-day Excel file +const local = { + excelFactory: new ExcelFactory({ settings: config }), + + excelFile: new ExcelFile({ + pathToFile: path.join(__dirname, '..', '..', 'data', 'day1.xlsx'), + settings: config + }) +} + +// Classes loading the remote 10-day Excel file +const remote = { + excelFile: new ExcelFile({ + pathToFile: path.join(__dirname, 'excelfiledownload4.xlsx'), + url: process.env.EXCEL_FILE_URL, + settings: config + }), + + excelFactory: new ExcelFactory({ + url: process.env.EXCEL_FILE_URL, + settings: config + }) +} + +/* eslint-disable no-undef */ +describe('Class intialization using CUSTOM config', () => { + beforeAll(async () => { + return await Promise.all([ + remote.excelFile.init(), + remote.excelFactory.init() + ]) + }) + + it('should load local Excel file', () => { + checkClass({ + excelInstance: local.excelFactory, + classType: ExcelFactory + }) + + checkClass({ + excelInstance: local.excelFile, + classType: ExcelFile + }) + }) + + it('should load remote Excel file', async () => { + jest.setTimeout(20000) + logger.log('[INIT]: Started loading using "CUSTOM" config') + + checkClass({ + excelInstance: remote.excelFactory, + isRemote: true, + classType: ExcelFactory + }) + + checkClass({ + excelInstance: remote.excelFile, + isRemote: true, + classType: ExcelFile + }) + }) +}) diff --git a/app/__tests__/classInitialization/defaultSettings.js b/app/__tests__/classInitialization/defaultSettings.js new file mode 100644 index 0000000..02e097c --- /dev/null +++ b/app/__tests__/classInitialization/defaultSettings.js @@ -0,0 +1,69 @@ +require('dotenv').config() +const path = require('path') + +const ExcelFile = require('../../src/classes/excel') +const ExcelFactory = require('../../src/classes/excelfactory') +const ColorLog = require('../../src/classes/colorlog') +const logger = new ColorLog({ isBold: true }) + +const checkClass = require('./checkClass') + +// Classes loading the default local 10-day Excel file +const local = { + excelFactory: new ExcelFactory(), + + excelFile: new ExcelFile({ + pathToFile: path.join(__dirname, '..', '..', 'data', 'day1.xlsx') + }) +} + +// Classes loading the remote 10-day Excel file +const remote = { + excelFile: new ExcelFile({ + pathToFile: path.join(__dirname, 'excelfiledownload4.xlsx'), + url: process.env.EXCEL_FILE_URL + }), + + excelFactory: new ExcelFactory({ + url: process.env.EXCEL_FILE_URL + }) +} + +/* eslint-disable no-undef */ +describe('Class intialization using DEFAULT config', () => { + beforeAll(async () => { + return await Promise.all([ + remote.excelFile.init(), + remote.excelFactory.init() + ]) + }) + + it('should load local Excel file', () => { + checkClass({ + excelInstance: local.excelFactory, + classType: ExcelFactory + }) + + checkClass({ + excelInstance: local.excelFile, + classType: ExcelFile + }) + }) + + it('should load remote Excel file', async () => { + jest.setTimeout(20000) + logger.log('[INIT]: Started loading using "DEFAULT" config') + + checkClass({ + excelInstance: remote.excelFactory, + isRemote: true, + classType: ExcelFactory + }) + + checkClass({ + excelInstance: remote.excelFile, + isRemote: true, + classType: ExcelFile + }) + }) +}) diff --git a/app/__tests__/classInitialization/fileLoading.js b/app/__tests__/classInitialization/fileLoading.js deleted file mode 100644 index ec7eb8c..0000000 --- a/app/__tests__/classInitialization/fileLoading.js +++ /dev/null @@ -1,120 +0,0 @@ -require('dotenv').config() -const path = require('path') - -const ExcelFile = require('../../src/classes/excel') -const ExcelFactory = require('../../src/classes/excelfactory') -const ColorLog = require('../../src/classes/colorlog') -const logger = new ColorLog({ isBold: true }) - -const checkClass = require('./checkClass') -const config = require('./config.json') - -/* eslint-disable no-undef */ -describe('Class intialization using DEFAULT config', () => { - it('should load local Excel file', () => { - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, '..', '..', 'data', 'day1.xlsx') - }) - - const excelFactory = new ExcelFactory() - - checkClass({ - excelInstance: excelFactory, - classType: ExcelFactory - }) - - checkClass({ - excelInstance: excelFile, - classType: ExcelFile - }) - }) - - it('should load remote Excel file', async () => { - jest.setTimeout(20000) - logger.log('[INIT]: Started loading using "DEFAULT" config') - - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, 'excelfiledownload4.xlsx'), - url: process.env.EXCEL_FILE_URL - }) - - const excelFactory = new ExcelFactory({ - url: process.env.EXCEL_FILE_URL - }) - - // Start file download - await Promise.all([ - excelFile.init(), - excelFactory.init() - ]) - - checkClass({ - excelInstance: excelFactory, - isRemote: true, - classType: ExcelFactory - }) - - checkClass({ - excelInstance: excelFile, - isRemote: true, - classType: ExcelFile - }) - }) -}) - -describe('Class intialization using CUSTOM config', () => { - it('should load local Excel file', () => { - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, '..', '..', 'data', 'day1.xlsx'), - settings: config - }) - - const excelFactory = new ExcelFactory({ - settings: config - }) - - checkClass({ - excelInstance: excelFactory, - classType: ExcelFactory - }) - - checkClass({ - excelInstance: excelFile, - classType: ExcelFile - }) - }) - - it('should load remote Excel file', async () => { - jest.setTimeout(20000) - logger.log('[INIT]: Started loading using "CUSTOM" config') - - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, 'excelfiledownload5.xlsx'), - url: process.env.EXCEL_FILE_URL, - settings: config - }) - - const excelFactory = new ExcelFactory({ - url: process.env.EXCEL_FILE_URL, - settings: config - }) - - // Start file download - await Promise.all([ - excelFile.init(), - excelFactory.init() - ]) - - checkClass({ - excelInstance: excelFactory, - isRemote: true, - classType: ExcelFactory - }) - - checkClass({ - excelInstance: excelFile, - isRemote: true, - classType: ExcelFile - }) - }) -}) diff --git a/app/jest.config.js b/app/jest.config.js index 5067444..9988879 100644 --- a/app/jest.config.js +++ b/app/jest.config.js @@ -6,9 +6,12 @@ module.exports = { '/node_modules/', '__tests__/classInitialization/checkClass.js', '__tests__/municipalities/createMunicipalityInstance.js', + '__tests__/municipalities/municipalitiesCount.js', + '__tests__/municipalities/municipalitiesPerProvinceCount.js', '__tests__/municipalities/index.js', '__tests__/provinces/createInstances.js', '__tests__/provinces/updateInstances.js', + '__tests__/provinces/testProvinceCount.js', '__tests__/provinces/index.js' ] } From dbc05519175665629beb35fe13f67d981672734d Mon Sep 17 00:00:00 2001 From: ciatph Date: Wed, 28 Aug 2024 23:58:43 +0800 Subject: [PATCH 2/7] wip: initialize municipalities remote excelfile in b4all --- .../municipalities/municipalitiesCount.js | 18 +++++++++--------- app/jest.config.js | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/__tests__/municipalities/municipalitiesCount.js b/app/__tests__/municipalities/municipalitiesCount.js index 3fd4603..5ee46ba 100644 --- a/app/__tests__/municipalities/municipalitiesCount.js +++ b/app/__tests__/municipalities/municipalitiesCount.js @@ -9,20 +9,20 @@ const checkClass = require('../classInitialization/checkClass') const createMunicipalityInstance = require('./createMunicipalityInstance') const { arrayToString } = require('../../src/lib/utils') +// Test using the latest 10-day PAGASA Excel file +const excelFile = new ExcelFile({ + pathToFile: path.join(__dirname, 'excelfiledownload.xlsx'), + url: process.env.EXCEL_FILE_URL +}) + /* eslint-disable no-undef */ describe('Municipalities total count match', () => { - // Test using the latest 10-day PAGASA Excel file - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, 'excelfiledownload.xlsx'), - url: process.env.EXCEL_FILE_URL + beforeAll(async () => { + // Start file download + return await excelFile.init() }) it('municipalities from provinces config should match with original Excel municipalities count', async () => { - jest.setTimeout(20000) - - // Start file download - await excelFile.init() - const { excel, config, diff --git a/app/jest.config.js b/app/jest.config.js index 9988879..3b7b5e6 100644 --- a/app/jest.config.js +++ b/app/jest.config.js @@ -6,7 +6,7 @@ module.exports = { '/node_modules/', '__tests__/classInitialization/checkClass.js', '__tests__/municipalities/createMunicipalityInstance.js', - '__tests__/municipalities/municipalitiesCount.js', + // '__tests__/municipalities/municipalitiesCount.js', '__tests__/municipalities/municipalitiesPerProvinceCount.js', '__tests__/municipalities/index.js', '__tests__/provinces/createInstances.js', From 32759ac54cb2663a829e1c304f0d8d27edffa231 Mon Sep 17 00:00:00 2001 From: ciatph Date: Thu, 29 Aug 2024 00:09:16 +0800 Subject: [PATCH 3/7] wip: initialize municipalities per province remote excelfile in b4all --- .../municipalitiesPerProvinceCount.js | 18 +++++++++--------- app/jest.config.js | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/__tests__/municipalities/municipalitiesPerProvinceCount.js b/app/__tests__/municipalities/municipalitiesPerProvinceCount.js index e744357..5155562 100644 --- a/app/__tests__/municipalities/municipalitiesPerProvinceCount.js +++ b/app/__tests__/municipalities/municipalitiesPerProvinceCount.js @@ -8,20 +8,20 @@ const logger = new ColorLog() const checkClass = require('../classInitialization/checkClass') const { arrayToString } = require('../../src/lib/utils') +// Test using the latest 10-day PAGASA Excel file +const excelFile = new ExcelFile({ + pathToFile: path.join(__dirname, 'excelfiledownload2.xlsx'), + url: process.env.EXCEL_FILE_URL +}) + /* eslint-disable no-undef */ describe('Municipalities per province count match', () => { - // Test using the latest 10-day PAGASA Excel file - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, 'excelfiledownload2.xlsx'), - url: process.env.EXCEL_FILE_URL + beforeAll(async () => { + // Start file download + return await excelFile.init() }) it('number of parsed/processed municipalities per province should match per province count from original data', async () => { - jest.setTimeout(20000) - - // Start file download - await excelFile.init() - // Parsed/processed provinces from the Excel file const allProvinces = excelFile.listAllProvinces(true) diff --git a/app/jest.config.js b/app/jest.config.js index 3b7b5e6..196b5b6 100644 --- a/app/jest.config.js +++ b/app/jest.config.js @@ -7,7 +7,7 @@ module.exports = { '__tests__/classInitialization/checkClass.js', '__tests__/municipalities/createMunicipalityInstance.js', // '__tests__/municipalities/municipalitiesCount.js', - '__tests__/municipalities/municipalitiesPerProvinceCount.js', + // '__tests__/municipalities/municipalitiesPerProvinceCount.js', '__tests__/municipalities/index.js', '__tests__/provinces/createInstances.js', '__tests__/provinces/updateInstances.js', From 8e8a33f04c656568e8b3d582b1ac478969ba7eb4 Mon Sep 17 00:00:00 2001 From: ciatph Date: Thu, 29 Aug 2024 00:26:02 +0800 Subject: [PATCH 4/7] wip: initialize provinces excelfile test in b4all --- app/__tests__/provinces/testProvinceCount.js | 16 +++++++++------- app/jest.config.js | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/__tests__/provinces/testProvinceCount.js b/app/__tests__/provinces/testProvinceCount.js index 3152bf3..6d9146f 100644 --- a/app/__tests__/provinces/testProvinceCount.js +++ b/app/__tests__/provinces/testProvinceCount.js @@ -7,20 +7,22 @@ const checkClass = require('../classInitialization/checkClass') const createInstances = require('./createInstances') const updateInstances = require('./updateInstances') +// Test using the latest 10-day PAGASA Excel file +const excelFile = new ExcelFile({ + pathToFile: path.join(__dirname, 'excelfiledownload3.xlsx'), + url: process.env.EXCEL_FILE_URL +}) + /* eslint-disable no-undef */ describe('Provinces names and count match', () => { - // Test using the latest 10-day PAGASA Excel file - const excelFile = new ExcelFile({ - pathToFile: path.join(__dirname, 'excelfiledownload3.xlsx'), - url: process.env.EXCEL_FILE_URL + beforeAll(async () => { + // Start file download + return await excelFile.init() }) it('settings (seasonal) provinces should match with (10-day) Excel provinces', async () => { jest.setTimeout(20000) - // Start file download - await excelFile.init() - const { allExcelProvinces, allProvinces, diff --git a/app/jest.config.js b/app/jest.config.js index 196b5b6..5eef639 100644 --- a/app/jest.config.js +++ b/app/jest.config.js @@ -11,7 +11,7 @@ module.exports = { '__tests__/municipalities/index.js', '__tests__/provinces/createInstances.js', '__tests__/provinces/updateInstances.js', - '__tests__/provinces/testProvinceCount.js', + // '__tests__/provinces/testProvinceCount.js', '__tests__/provinces/index.js' ] } From ee1d98d301076d17700a56fef43332b498fd5b07 Mon Sep 17 00:00:00 2001 From: ciatph Date: Thu, 29 Aug 2024 00:30:38 +0800 Subject: [PATCH 5/7] chore: restore jest timeouts in it() methods --- app/__tests__/classInitialization/customSettings.js | 5 ++++- app/__tests__/classInitialization/defaultSettings.js | 5 ++++- app/__tests__/municipalities/municipalitiesCount.js | 2 ++ .../municipalities/municipalitiesPerProvinceCount.js | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/__tests__/classInitialization/customSettings.js b/app/__tests__/classInitialization/customSettings.js index efb6f7e..f477f37 100644 --- a/app/__tests__/classInitialization/customSettings.js +++ b/app/__tests__/classInitialization/customSettings.js @@ -43,6 +43,9 @@ describe('Class intialization using CUSTOM config', () => { }) it('should load local Excel file', () => { + jest.setTimeout(20000) + logger.log('[INIT]: Started loading using "CUSTOM" config on LOCAL file') + checkClass({ excelInstance: local.excelFactory, classType: ExcelFactory @@ -56,7 +59,7 @@ describe('Class intialization using CUSTOM config', () => { it('should load remote Excel file', async () => { jest.setTimeout(20000) - logger.log('[INIT]: Started loading using "CUSTOM" config') + logger.log('[INIT]: Started loading using "CUSTOM" config on REMOTE file') checkClass({ excelInstance: remote.excelFactory, diff --git a/app/__tests__/classInitialization/defaultSettings.js b/app/__tests__/classInitialization/defaultSettings.js index 02e097c..bdf0177 100644 --- a/app/__tests__/classInitialization/defaultSettings.js +++ b/app/__tests__/classInitialization/defaultSettings.js @@ -39,6 +39,9 @@ describe('Class intialization using DEFAULT config', () => { }) it('should load local Excel file', () => { + jest.setTimeout(20000) + logger.log('[INIT]: Started loading using "DEFAULT" config on LOCAL file') + checkClass({ excelInstance: local.excelFactory, classType: ExcelFactory @@ -52,7 +55,7 @@ describe('Class intialization using DEFAULT config', () => { it('should load remote Excel file', async () => { jest.setTimeout(20000) - logger.log('[INIT]: Started loading using "DEFAULT" config') + logger.log('[INIT]: Started loading using "DEFAULT" config on REMOTE file') checkClass({ excelInstance: remote.excelFactory, diff --git a/app/__tests__/municipalities/municipalitiesCount.js b/app/__tests__/municipalities/municipalitiesCount.js index 5ee46ba..9a61cbf 100644 --- a/app/__tests__/municipalities/municipalitiesCount.js +++ b/app/__tests__/municipalities/municipalitiesCount.js @@ -23,6 +23,8 @@ describe('Municipalities total count match', () => { }) it('municipalities from provinces config should match with original Excel municipalities count', async () => { + jest.setTimeout(20000) + const { excel, config, diff --git a/app/__tests__/municipalities/municipalitiesPerProvinceCount.js b/app/__tests__/municipalities/municipalitiesPerProvinceCount.js index 5155562..385d645 100644 --- a/app/__tests__/municipalities/municipalitiesPerProvinceCount.js +++ b/app/__tests__/municipalities/municipalitiesPerProvinceCount.js @@ -22,6 +22,8 @@ describe('Municipalities per province count match', () => { }) it('number of parsed/processed municipalities per province should match per province count from original data', async () => { + jest.setTimeout(20000) + // Parsed/processed provinces from the Excel file const allProvinces = excelFile.listAllProvinces(true) From 58ef8194ded7efff487bf7b72cb51f9d38de75ec Mon Sep 17 00:00:00 2001 From: ciatph Date: Thu, 29 Aug 2024 00:41:08 +0800 Subject: [PATCH 6/7] chore: update code comments --- .../classInitialization/customSettings.js | 24 +++++++++---------- .../classInitialization/defaultSettings.js | 24 +++++++++---------- .../municipalities/municipalitiesCount.js | 1 + 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/app/__tests__/classInitialization/customSettings.js b/app/__tests__/classInitialization/customSettings.js index f477f37..2e8bc01 100644 --- a/app/__tests__/classInitialization/customSettings.js +++ b/app/__tests__/classInitialization/customSettings.js @@ -9,8 +9,8 @@ const logger = new ColorLog({ isBold: true }) const checkClass = require('./checkClass') const config = require('./config.json') -// Classes loading the default local 10-day Excel file -const local = { +// Classes loading the default local 10-day Excel file using a custom regions config +const LOCAL_SOURCE = { excelFactory: new ExcelFactory({ settings: config }), excelFile: new ExcelFile({ @@ -19,8 +19,8 @@ const local = { }) } -// Classes loading the remote 10-day Excel file -const remote = { +// Classes loading the remote 10-day Excel file using a custom regions config +const REMOTE_SOURCE = { excelFile: new ExcelFile({ pathToFile: path.join(__dirname, 'excelfiledownload4.xlsx'), url: process.env.EXCEL_FILE_URL, @@ -37,38 +37,38 @@ const remote = { describe('Class intialization using CUSTOM config', () => { beforeAll(async () => { return await Promise.all([ - remote.excelFile.init(), - remote.excelFactory.init() + REMOTE_SOURCE.excelFile.init(), + REMOTE_SOURCE.excelFactory.init() ]) }) - it('should load local Excel file', () => { + it('should load LOCAL_SOURCE Excel file', () => { jest.setTimeout(20000) logger.log('[INIT]: Started loading using "CUSTOM" config on LOCAL file') checkClass({ - excelInstance: local.excelFactory, + excelInstance: LOCAL_SOURCE.excelFactory, classType: ExcelFactory }) checkClass({ - excelInstance: local.excelFile, + excelInstance: LOCAL_SOURCE.excelFile, classType: ExcelFile }) }) - it('should load remote Excel file', async () => { + it('should load REMOTE_SOURCE Excel file', async () => { jest.setTimeout(20000) logger.log('[INIT]: Started loading using "CUSTOM" config on REMOTE file') checkClass({ - excelInstance: remote.excelFactory, + excelInstance: REMOTE_SOURCE.excelFactory, isRemote: true, classType: ExcelFactory }) checkClass({ - excelInstance: remote.excelFile, + excelInstance: REMOTE_SOURCE.excelFile, isRemote: true, classType: ExcelFile }) diff --git a/app/__tests__/classInitialization/defaultSettings.js b/app/__tests__/classInitialization/defaultSettings.js index bdf0177..2796b63 100644 --- a/app/__tests__/classInitialization/defaultSettings.js +++ b/app/__tests__/classInitialization/defaultSettings.js @@ -8,8 +8,8 @@ const logger = new ColorLog({ isBold: true }) const checkClass = require('./checkClass') -// Classes loading the default local 10-day Excel file -const local = { +// Classes loading the default local 10-day Excel file using the default PAGASA seasonal config +const LOCAL_SOURCE = { excelFactory: new ExcelFactory(), excelFile: new ExcelFile({ @@ -17,8 +17,8 @@ const local = { }) } -// Classes loading the remote 10-day Excel file -const remote = { +// Classes loading the remote 10-day Excel file using the default PAGASA seasonal config +const REMOTE_SOURCE = { excelFile: new ExcelFile({ pathToFile: path.join(__dirname, 'excelfiledownload4.xlsx'), url: process.env.EXCEL_FILE_URL @@ -33,38 +33,38 @@ const remote = { describe('Class intialization using DEFAULT config', () => { beforeAll(async () => { return await Promise.all([ - remote.excelFile.init(), - remote.excelFactory.init() + REMOTE_SOURCE.excelFile.init(), + REMOTE_SOURCE.excelFactory.init() ]) }) - it('should load local Excel file', () => { + it('should load LOCAL_SOURCE Excel file', () => { jest.setTimeout(20000) logger.log('[INIT]: Started loading using "DEFAULT" config on LOCAL file') checkClass({ - excelInstance: local.excelFactory, + excelInstance: LOCAL_SOURCE.excelFactory, classType: ExcelFactory }) checkClass({ - excelInstance: local.excelFile, + excelInstance: LOCAL_SOURCE.excelFile, classType: ExcelFile }) }) - it('should load remote Excel file', async () => { + it('should load REMOTE_SOURCE Excel file', async () => { jest.setTimeout(20000) logger.log('[INIT]: Started loading using "DEFAULT" config on REMOTE file') checkClass({ - excelInstance: remote.excelFactory, + excelInstance: REMOTE_SOURCE.excelFactory, isRemote: true, classType: ExcelFactory }) checkClass({ - excelInstance: remote.excelFile, + excelInstance: REMOTE_SOURCE.excelFile, isRemote: true, classType: ExcelFile }) diff --git a/app/__tests__/municipalities/municipalitiesCount.js b/app/__tests__/municipalities/municipalitiesCount.js index 9a61cbf..d8b9a92 100644 --- a/app/__tests__/municipalities/municipalitiesCount.js +++ b/app/__tests__/municipalities/municipalitiesCount.js @@ -25,6 +25,7 @@ describe('Municipalities total count match', () => { it('municipalities from provinces config should match with original Excel municipalities count', async () => { jest.setTimeout(20000) + // Create local/remote ExcelFile classes using the default PAGASA region settings const { excel, config, From 6e988a77dc1c6dec1b5efc312bbc578b663b3c29 Mon Sep 17 00:00:00 2001 From: ciatph Date: Thu, 29 Aug 2024 00:45:25 +0800 Subject: [PATCH 7/7] chore: increase jest timeout on promise arrays --- app/__tests__/classInitialization/customSettings.js | 2 +- app/__tests__/classInitialization/defaultSettings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/__tests__/classInitialization/customSettings.js b/app/__tests__/classInitialization/customSettings.js index 2e8bc01..b8832f6 100644 --- a/app/__tests__/classInitialization/customSettings.js +++ b/app/__tests__/classInitialization/customSettings.js @@ -43,7 +43,7 @@ describe('Class intialization using CUSTOM config', () => { }) it('should load LOCAL_SOURCE Excel file', () => { - jest.setTimeout(20000) + jest.setTimeout(40000) logger.log('[INIT]: Started loading using "CUSTOM" config on LOCAL file') checkClass({ diff --git a/app/__tests__/classInitialization/defaultSettings.js b/app/__tests__/classInitialization/defaultSettings.js index 2796b63..06b7a4a 100644 --- a/app/__tests__/classInitialization/defaultSettings.js +++ b/app/__tests__/classInitialization/defaultSettings.js @@ -39,7 +39,7 @@ describe('Class intialization using DEFAULT config', () => { }) it('should load LOCAL_SOURCE Excel file', () => { - jest.setTimeout(20000) + jest.setTimeout(40000) logger.log('[INIT]: Started loading using "DEFAULT" config on LOCAL file') checkClass({