Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ module.exports = {
],
coveragePathIgnorePatterns: [
'/node_modules/',
'<rootDir>/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js'
]
'<rootDir>/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js',
'<rootDir>/src-electron/generator/matter/app/zap-templates/templates/app/helper.js',
'<rootDir>/src-electron/generator/matter/app/zap-templates/templates/chip/ListHelper.js',
'<rootDir>/src-electron/generator/matter/app/zap-templates/templates/chip/helper.js',
'<rootDir>/src-electron/generator/matter/app/zap-templates/common/ClusterTestGeneration.js',
'<rootDir>/src-electron/generator/matter/chip-tool/templates/helper.js',
'<rootDir>/src-electron/generator/matter/chip-tool/templates/tests/helper.js'
],
testEnvironment: 'jsdom'
}
6 changes: 5 additions & 1 deletion src-electron/db/query-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,11 @@ async function selectCommandDetailsFromAllEndpointTypesAndClusters(
}

// Ordering of the results:
query = query + ' ORDER BY MANUFACTURER_CODE, CODE, NAME'
query =
query +
(doGroupBy
? ' ORDER BY MANUFACTURER_CODE, CODE, NAME'
: ' ORDER BY C.MANUFACTURER_CODE, C.CODE, C.NAME')

return dbApi.dbAll(db, query).then((rows) => rows.map(commandMapFunction))
}
Expand Down
1 change: 1 addition & 0 deletions src-electron/generator/helper-zcl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,7 @@ function isEnabled(enable) {
* @returns boolean
*/
function isCommandAvailable(clusterSide, incoming, outgoing, source, name) {
if (!clusterSide || !source) return false
if (0 == clusterSide.localeCompare(source)) {
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ exports.meta = {
category: dbEnum.helperCategory.matter,
alias: ['common/attributes/Accessors.js', 'matter-accessors']
};

// Exports for unit testing
exports.isUnsupportedType = isUnsupportedType;
4 changes: 4 additions & 0 deletions src-electron/main-process/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -1206,3 +1206,7 @@ exports.shutdown = shutdown
exports.quit = quit
exports.generateSingleFile = generateSingleFile
exports.upgradeZapFile = upgradeZapFile
exports.gatherFiles = gatherFiles
exports.noopConvert = noopConvert
exports.findZapFiles = findZapFiles
exports.outputFile = outputFile
3 changes: 3 additions & 0 deletions src-electron/rest/user-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1359,3 +1359,6 @@ exports.patch = [
callback: httpPatchUpdateBitOfFeatureMapAttribute
}
]

//Exports added for testing
exports.httpPostDuplicateEndpointType = httpPostDuplicateEndpointType
Loading