vitest-environment-uniapp 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/global.d.ts +9 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
> [!IMPORTANT]
|
|
11
11
|
> 该项目依赖 `@dcloudio/uni-automator` 必须安装
|
|
12
12
|
> h5 平台下,需要安装 `playwright` ; 但目前无法获取启动状态导致超时
|
|
13
|
+
>
|
|
13
14
|
> environmentOptions 参数同 [uni-app 官方文档](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html#jestconfigjs) , 但官网长久未更新,导致参数与实际不符
|
|
14
15
|
|
|
15
16
|
## 安装
|
package/global.d.ts
CHANGED
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import 'vitest/node'
|
|
2
2
|
|
|
3
|
+
type RecordUnknown = Record<string, unknown>
|
|
4
|
+
|
|
3
5
|
declare module 'vitest/node' {
|
|
4
6
|
interface EnvironmentOptions {
|
|
5
7
|
/**
|
|
6
8
|
* uniapp 测试环境选项,详情请参考[uni-app 自动化测试](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html#jestconfigjs)
|
|
7
9
|
*/
|
|
8
|
-
uniapp?: {
|
|
10
|
+
uniapp?: Partial<RecordUnknown & {
|
|
9
11
|
/**
|
|
10
12
|
* H5 测试选项
|
|
11
13
|
*/
|
|
12
|
-
'h5':
|
|
13
|
-
[x: string]: unknown
|
|
14
|
-
}
|
|
14
|
+
'h5': RecordUnknown
|
|
15
15
|
/**
|
|
16
16
|
* app-plus 测试选项, 需要安装 HBuilderX
|
|
17
17
|
*/
|
|
18
|
-
'app-plus':
|
|
19
|
-
[x: string]: unknown
|
|
20
|
-
}
|
|
18
|
+
'app-plus': RecordUnknown
|
|
21
19
|
/**
|
|
22
20
|
* 微信小程序测试选项
|
|
23
21
|
*/
|
|
24
|
-
'mp-weixin':
|
|
25
|
-
[x: string]: unknown
|
|
26
|
-
}
|
|
22
|
+
'mp-weixin': RecordUnknown
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
24
|
+
* 百度小程序测试选项
|
|
29
25
|
*/
|
|
30
|
-
'mp-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
26
|
+
'mp-baidu': RecordUnknown
|
|
27
|
+
}>
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
30
|
|
|
@@ -478,5 +472,3 @@ declare global {
|
|
|
478
472
|
exposeFunction: (name: string, bindingFunction: (() => unknown)) => Promise<void>
|
|
479
473
|
}
|
|
480
474
|
}
|
|
481
|
-
|
|
482
|
-
export {}
|