Skip to content

Commit

Permalink
Remove console prints for compliance when running tests
Browse files Browse the repository at this point in the history
- JIRA: ZAPP-1299

- set TEST environment variable before running jest tests, and only print when TEST is false
  • Loading branch information
ethanzhouyc committed Aug 7, 2024
1 parent daf08e8 commit aeaf56d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-electron/importexport/import-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,9 @@ async function importEndpointTypes(
clusterSpecCheckComplianceMessage,
dottedLine
)
console.log(deviceTypeSpecCheckComplianceMessage)
if (!process.env.TEST) {
console.log(deviceTypeSpecCheckComplianceMessage)
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions test/global-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
const env = require('../src-electron/util/env')

module.exports = async () => {
process.env.TEST = 'true'
env.logDebug('Global setup.')
}
1 change: 1 addition & 0 deletions test/global-teardown.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
const env = require('../src-electron/util/env')

module.exports = async () => {
delete process.env.TEST
env.logDebug('Global teardown.')
}

0 comments on commit aeaf56d

Please sign in to comment.