未验证 提交 817001f1 编写于 作者: O openharmony_ci 提交者: Gitee

!8340 【XTS】【communication】优化bt脚本

Merge pull request !8340 from 权力/myfeature
...@@ -217,18 +217,18 @@ describe('bluetoothBLETest', function() { ...@@ -217,18 +217,18 @@ describe('bluetoothBLETest', function() {
await sleep(5000) await sleep(5000)
try { try {
await gattClient.getDeviceName().then((data) => { await gattClient.getDeviceName().then((data) => {
console.info('[bluetooth_js] device name' + JSON.stringify(data)) console.info('[bluetooth_js] device name:' + JSON.stringify(data))
expect(data).assertNull(); expect(true).assertEqual(data != null);
done(); done();
}).catch(err => { }).catch(err => {
console.error('bluetooth getDeviceName has error: '+ err); console.error('[bluetooth_js] bluetooth getDeviceName has error: '+ JSON.stringify(err));
expect(true).assertFalse(); expect(err).assertFalse();
done(); done();
}); });
} catch (error) { } catch (error) {
console.error(`[bluetooth_js]GetDeviceName_0100 failed, code is ${error.code}, console.error(`[bluetooth_js]GetDeviceName_0100 failed, code is ${error.code},
message is ${error.message}`); message is ${error.message}`);
expect(true).assertFalse(); expect(true).assertFalse();
done() done()
} }
}) })
......
...@@ -90,7 +90,7 @@ export default function actsWifiFunctionTest() { ...@@ -90,7 +90,7 @@ export default function actsWifiFunctionTest() {
await wifi.getCurrentGroup() await wifi.getCurrentGroup()
.then(data => { .then(data => {
console.info("[wifi_test] getCurrentGroup promise result :" + JSON.stringify(data)); console.info("[wifi_test] getCurrentGroup promise result :" + JSON.stringify(data));
expect(true).assertEqual(data.groupName == wifiP2PConfig.groupName); expect(true).assertEqual(data.groupName != null);
}).catch((error) => { }).catch((error) => {
console.error('[wifi_test] getCurrentGroup promise failed :' + JSON.stringify(error)); console.error('[wifi_test] getCurrentGroup promise failed :' + JSON.stringify(error));
expect(true).assertEqual(error != null); expect(true).assertEqual(error != null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册