File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2222 "test" : " npm run test:unit && npm run test:integ" ,
2323 "test:unit" : " APP_CONFIG=./test/unit/utils/.app.json mocha test/unit/*.spec.js test/unit/**/*.spec.js test/unit/**/*.spec.js test/unit/**/**/*.spec.js --timeout=3000" ,
2424 "setupIntegTestConfig" : " node ./test/integration/setupTestConfig.js" ,
25- "test:integ" : " npm run setupIntegTestConfig && APP_CONFIG=./src/testConfig.json mocha test/integration/*.spec.js test/integration/**/*.spec.js --timeout=3000" ,
25+ "test:integ" : " npm run setupIntegTestConfig && TEST_ENV=integ APP_CONFIG=./src/testConfig.json mocha test/integration/*.spec.js test/integration/**/*.spec.js --timeout=3000" ,
2626 "printReportsLink" : " echo Detailed unit test coverage report: file:///$(pwd)/coverage-unit/index.html && echo Detailed integration test coverage report: file:///$(pwd)/coverage-integration/index.html" ,
2727 "cover" : " npm run cover:unit" ,
2828 "cover:unit" : " c8 -c .nycrc.unit.json npm run test:unit && npm run --silent printReportsLink" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ function _resetGithubOpsIssue() {
2222 githubOpsIssueForTheDay = null ;
2323}
2424export function setupGitHubOpsMonitoring ( ) {
25+ if ( process . env . TEST_ENV ) {
26+ console . log ( "test environment detected, disabling setupGitHubOpsMonitoring flow" ) ;
27+ return ;
28+ }
2529 setInterval ( _resetTPH , ONE_HOUR ) ;
2630 setInterval ( _resetGithubOpsIssue , ONE_DAY ) ;
2731}
Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ export async function _syncPopularityEvery15Minutes() { // exported for unit tes
196196// not testing this as no time and is manually tested. If you are touching this code, manual test thoroughly
197197let worker ;
198198export function startCollectStarsWorker ( ) {
199+ if ( process . env . TEST_ENV ) {
200+ console . log ( "test environment detected, disabling startCollectStarsWorker flow" ) ;
201+ return ;
202+ }
199203 if ( worker ) {
200204 return ;
201205 }
You can’t perform that action at this time.
0 commit comments