提交 4d897372 编写于 作者: 雪洛's avatar 雪洛

test: 增加UTSHarmony.getUIAbilityContext测试

上级 a3befc19
import { describe, test, expect, Result } from './tests.uts'
// #ifdef APP-HARMONY
let tempDir = ''
UTSHarmony.onAppAbilityCreate(() => {
const context = UTSHarmony.getUIAbilityContext()
tempDir = context?.getApplicationContext?.()?.tempDir || ''
})
// #endif
export function testUTSXXX() : Result {
return describe("KeyWord", () => {
......@@ -17,9 +25,11 @@ export function testUTSXXX() : Result {
// #endif
})
// #ifdef APP-HARMONY
test('UTSHarmony_getUIAbilityContext', () => {
expect(tempDir.length > 0).toEqual(true)
})
// #endif
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册