From d4421ea0056b40e4619b551ef570d507ad700151 Mon Sep 17 00:00:00 2001 From: yurj26 <1816387074@qq.com> Date: Sat, 1 Jul 2023 11:23:47 +0800 Subject: [PATCH] feat(uts-tests): add uvue --- pages/advance/advance.vue | 7 +++ pages/test/index.test.js | 4 +- pages/test/index.uvue | 62 ++++++++++++++++++++++++++ uni_modules/uts-tests/utssdk/index.uts | 2 +- 4 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 pages/test/index.uvue diff --git a/pages/advance/advance.vue b/pages/advance/advance.vue index acb6737..50f1c1f 100644 --- a/pages/advance/advance.vue +++ b/pages/advance/advance.vue @@ -28,6 +28,8 @@ + + @@ -198,6 +200,11 @@ url: '/pages/SyntaxCase/consoleTest' }) }, + testGrammar: function() { + uni.navigateTo({ + url: '/pages/test/index' + }) + }, testGetResourcePath: function() { uni.navigateTo({ url: '/pages/advance/iOS/getResourcePath' diff --git a/pages/test/index.test.js b/pages/test/index.test.js index fc88caa..b0539ee 100644 --- a/pages/test/index.test.js +++ b/pages/test/index.test.js @@ -6,8 +6,8 @@ beforeAll(async () => { await program.reLaunch('/pages/test/index') page = await program.currentPage() await page.waitFor(3000); - const data = await page.data('result'); - result = data + const data = await page.data(); + result = data['result'] }) function getApiFailed(describe, api) { diff --git a/pages/test/index.uvue b/pages/test/index.uvue new file mode 100644 index 0000000..d954922 --- /dev/null +++ b/pages/test/index.uvue @@ -0,0 +1,62 @@ + + + \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/index.uts b/uni_modules/uts-tests/utssdk/index.uts index 7cac94d..c2fe59a 100644 --- a/uni_modules/uts-tests/utssdk/index.uts +++ b/uni_modules/uts-tests/utssdk/index.uts @@ -13,7 +13,7 @@ import { testRegExp } from './RegExp.uts' // import { testReactiveArray } from './reactiveArray.uts' // import { testReactiveMap } from './ReactiveMap.uts' // #endif -// export { Result } from './tests.uts' +export { Result } from './tests.uts' // Promise、Proxy、Reflect、Weakmap、WeakSet 不支持 export function runTests() : UTSJSONObject { -- GitLab