Skip to content

Commit

Permalink
add more unit tests for matter file
Browse files Browse the repository at this point in the history
  • Loading branch information
paulr34 committed Aug 12, 2024
1 parent eb22b02 commit 5109dfd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/matter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const testUtil = require('./test-util')
const env = require('../src-electron/util/env')
const dbApi = require('../src-electron/db/db-api')
const zclLoader = require('../src-electron/zcl/zcl-loader')
const dbEnum = require('../src-shared/db-enum.js')

beforeAll(async () => {
env.setDevelopmentEnv()
Expand All @@ -28,3 +29,13 @@ test(
},
testUtil.timeout.long()
)
test('compute storage policy new config', async () => {
const result1 = await matter.computeStorageOptionNewConfig(
dbEnum.storagePolicy.attributeAccessInterface
)
expect(result1).toEqual(dbEnum.storageOption.external)
const result2 = await matter.computeStorageOptionNewConfig(
dbEnum.storagePolicy.any
)
expect(result2).toEqual(dbEnum.storageOption.ram)
})

0 comments on commit 5109dfd

Please sign in to comment.