提交 b52cd769 编写于 作者: O openharmony_ci 提交者: Gitee

!946 【communication】修改WIFI JS L2测试用例3

Merge pull request !946 from 权力/myfeature
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import app from '@system.app' import app from '@system.app'
//import {Core, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
import {Core, ExpectExtend} from 'deccjsunit/index' import {Core, ExpectExtend} from 'deccjsunit/index'
export default { export default {
...@@ -28,22 +27,18 @@ export default { ...@@ -28,22 +27,18 @@ export default {
onShow() { onShow() {
console.info('onShow finish') console.info('onShow finish')
const core = Core.getInstance() const core = Core.getInstance()
// const instrumentLog = new InstrumentLog({
// 'id': 'report'
// })
const expectExtend = new ExpectExtend({ const expectExtend = new ExpectExtend({
'id': 'extend' 'id': 'extend'
}) })
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
// core.addService('report', instrumentLog) // core.addService('report', instrumentLog)
core.init() core.init()
// core.subscribeEvent('spec', instrumentLog)
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
this.timeout = 5000
require('../../test/List.test') require('../../test/List.test')
core.execute() core.execute()
}, },
......
...@@ -84,6 +84,8 @@ it('wifi_native_js_unit_test_003', 0, function () { ...@@ -84,6 +84,8 @@ it('wifi_native_js_unit_test_003', 0, function () {
*/ */
it('wifi_native_js_unit_test_005', 0, async function (done) { it('wifi_native_js_unit_test_005', 0, async function (done) {
console.info("[wifi_test] Wifi get scan infos callback test[1]."); console.info("[wifi_test] Wifi get scan infos callback test[1].");
var result = wifi.scan();
sleep(20000);
wifi.getScanInfos( wifi.getScanInfos(
(result) => { (result) => {
var clen = Object.keys(result).length; var clen = Object.keys(result).length;
...@@ -130,6 +132,8 @@ it('wifi_native_js_unit_test_006', 0, async function (done) { ...@@ -130,6 +132,8 @@ it('wifi_native_js_unit_test_006', 0, async function (done) {
console.info("band: " + result[j].band); console.info("band: " + result[j].band);
console.info("frequency: " + result[j].frequency); console.info("frequency: " + result[j].frequency);
console.info("timestamp: " + result[j].timestamp); console.info("timestamp: " + result[j].timestamp);
console.info("capabilities: " + result[j].capabilities);
console.info("channelWidth: " + result[j].channelWidth);
} }
}); });
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册