Skip to content
代码片段 群组 项目
提交 4a9e6104 编辑于 作者: Thuc Tran's avatar Thuc Tran
浏览文件

Add timeouts, move load ZCL operation to a loading test

上级 6211a443
No related branches found
No related tags found
无相关合并请求
......@@ -35,13 +35,16 @@ beforeAll(() => {
var file = sqliteTestFile('validation')
return initDatabase(file)
.then((d) => loadSchema(d, schemaFile(), version))
.then((d) => loadZcl(d, zclPropertiesFile))
.then((d) => {
db = d
logInfo('DB initialized.')
})
})
test('Load the static data.', () => {
return loadZcl(db, zclPropertiesFile)
}, 5000)
test('isValidNumberString Functions', () => {
// Integer
expect(Validation.isValidNumberString('0x0000')).toBeTruthy()
......@@ -109,7 +112,7 @@ test('Integer Test', () => {
return Promise.resolve()
})
})
}, 1000)
test('validate Attribute Test', () => {
var fakeEndpointAttribute = {
......@@ -192,7 +195,7 @@ test('validate Attribute Test', () => {
Validation.validateSpecificAttribute(fakeEndpointAttribute, fakeAttribute)
.defaultValue.length == 0
).toBeTruthy()
})
}, 2000)
test('validate endpoint test', () => {
//Validate normal operation
......@@ -236,4 +239,4 @@ test('validate endpoint test', () => {
expect(
Validation.validateSpecificEndpoint(endpoint).endpointId.length == 0
).toBeFalsy()
})
}, 2000)
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册