Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
96f630a6
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6005
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
96f630a6
编写于
9月 26, 2023
作者:
taohebin@dcloud.io
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 1. 修改测试用例 2. 去除warning
上级
007ef7ba
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
19 addition
and
13 deletion
+19
-13
pages/API/get-app-base-info/get-app-base-info.test.js
pages/API/get-app-base-info/get-app-base-info.test.js
+6
-4
pages/API/get-device-info/get-device-info.test.js
pages/API/get-device-info/get-device-info.test.js
+7
-5
pages/API/get-system-info/get-system-info.test.js
pages/API/get-system-info/get-system-info.test.js
+4
-2
pages/API/get-system-setting/get-system-setting.uvue
pages/API/get-system-setting/get-system-setting.uvue
+2
-2
未找到文件。
pages/API/get-app-base-info/get-app-base-info.test.js
浏览文件 @
96f630a6
...
@@ -19,11 +19,13 @@ describe('ExtApi-GetAppBaseInfo', () => {
...
@@ -19,11 +19,13 @@ describe('ExtApi-GetAppBaseInfo', () => {
it
(
'
Check properties
'
,
async
()
=>
{
it
(
'
Check properties
'
,
async
()
=>
{
for
(
const
key
in
res
)
{
for
(
const
key
in
res
)
{
const
value
=
res
[
key
];
const
value
=
res
[
key
];
expect
(
value
).
not
.
toBeNull
(
);
console
.
log
(
"
key :
"
,
key
,
"
value :
"
,
value
);
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
expect
(
value
).
not
.
toBeNull
();
expect
(
value
).
not
.
toBe
(
""
);
expect
(
value
).
not
.
toBe
(
""
);
}
}
if
(
numberProperties
.
indexOf
(
key
)
!=
-
1
)
{
if
(
numberProperties
.
indexOf
(
key
)
!=
-
1
)
{
expect
(
value
).
not
.
toBeNull
();
expect
(
value
).
toBeGreaterThanOrEqual
(
3.90
);
expect
(
value
).
toBeGreaterThanOrEqual
(
3.90
);
}
}
}
}
...
...
pages/API/get-device-info/get-device-info.test.js
浏览文件 @
96f630a6
...
@@ -16,11 +16,13 @@ describe('ExtApi-GetDeviceInfo', () => {
...
@@ -16,11 +16,13 @@ describe('ExtApi-GetDeviceInfo', () => {
it
(
'
Check properties
'
,
async
()
=>
{
it
(
'
Check properties
'
,
async
()
=>
{
for
(
const
key
in
res
)
{
for
(
const
key
in
res
)
{
const
value
=
res
[
key
];
const
value
=
res
[
key
];
expect
(
value
).
not
.
toBeNull
(
);
console
.
log
(
"
key :
"
,
key
,
"
value :
"
,
value
);
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
expect
(
value
).
not
.
toBeNull
();
expect
(
value
).
not
.
toBe
(
""
);
expect
(
value
).
not
.
toBe
(
""
);
}
}
if
(
key
==
'
deviceOrientation
'
)
{
if
(
key
==
'
deviceOrientation
'
)
{
expect
(
value
).
not
.
toBeNull
();
expect
([
'
portrait
'
,
'
landscape
'
]).
toContain
(
value
);
expect
([
'
portrait
'
,
'
landscape
'
]).
toContain
(
value
);
}
}
}
}
...
...
pages/API/get-system-info/get-system-info.test.js
浏览文件 @
96f630a6
...
@@ -25,11 +25,13 @@ describe('ExtApi-GetSystemInfo', () => {
...
@@ -25,11 +25,13 @@ describe('ExtApi-GetSystemInfo', () => {
it
(
'
Check GetSystemInfoSync
'
,
async
()
=>
{
it
(
'
Check GetSystemInfoSync
'
,
async
()
=>
{
for
(
const
key
in
res
)
{
for
(
const
key
in
res
)
{
const
value
=
res
[
key
];
const
value
=
res
[
key
];
expect
(
value
).
not
.
toBeNull
(
);
console
.
log
(
"
key :
"
,
key
,
"
value :
"
,
value
);
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
if
(
stringProperties
.
indexOf
(
key
)
!=
-
1
)
{
expect
(
value
).
not
.
toBeNull
();
expect
(
value
).
not
.
toBe
(
""
);
expect
(
value
).
not
.
toBe
(
""
);
}
}
if
(
numberProperties
.
indexOf
(
key
)
!=
-
1
)
{
if
(
numberProperties
.
indexOf
(
key
)
!=
-
1
)
{
expect
(
value
).
not
.
toBeNull
();
expect
(
value
).
toBeGreaterThanOrEqual
(
0
);
expect
(
value
).
toBeGreaterThanOrEqual
(
0
);
}
}
if
(
key
==
'
deviceOrientation
'
)
{
if
(
key
==
'
deviceOrientation
'
)
{
...
...
pages/API/get-system-setting/get-system-setting.uvue
浏览文件 @
96f630a6
...
@@ -61,9 +61,9 @@
...
@@ -61,9 +61,9 @@
getSystemSetting: function () {
getSystemSetting: function () {
const res = uni.getSystemSetting();
const res = uni.getSystemSetting();
this.bluetoothEnabled = (res.bluetoothEnabled ?? false) ? "开启" : "关闭";
this.bluetoothEnabled = (res.bluetoothEnabled ?? false) ? "开启" : "关闭";
this.locationEnabled =
(res.locationEnabled ?? false)
? "开启" : "关闭";
this.locationEnabled =
res.locationEnabled
? "开启" : "关闭";
this.wifiEnabled = (res.wifiEnabled ?? false) ? "开启" : "关闭";
this.wifiEnabled = (res.wifiEnabled ?? false) ? "开启" : "关闭";
this.deviceOrientation = res.deviceOrientation
?? "";
this.deviceOrientation = res.deviceOrientation
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录