From 991eee472aeca918daaa11b650f4b034e34fba0b Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 22 Aug 2023 18:22:54 +0800 Subject: [PATCH] remove extapi test case --- uni_modules/uts-tests/utssdk/Extapi.uts | 70 ------------------------- uni_modules/uts-tests/utssdk/index.uts | 4 +- 2 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 uni_modules/uts-tests/utssdk/Extapi.uts diff --git a/uni_modules/uts-tests/utssdk/Extapi.uts b/uni_modules/uts-tests/utssdk/Extapi.uts deleted file mode 100644 index 58c9484..0000000 --- a/uni_modules/uts-tests/utssdk/Extapi.uts +++ /dev/null @@ -1,70 +0,0 @@ -import { describe, test, expect, Result } from './tests.uts' - - -export function testExtapi() : Result { - return describe("Storage", () => { - test('setStorage', () => { - - uni.setStorage({ - key: "dddddd", - data: 1, - complete: (res) => { - let ret = uni.getStorageSync("dddddd") - expect(ret).toEqual(1) - uni.setStorageSync("dddddd",3.14159265358) - ret = uni.getStorageSync("dddddd") - expect(ret).toEqual(3.14159265358) - } - }) - - - uni.setStorage({ - key: "dddddd", - data: true, - complete: (res) => { - console.log(res) - let ret = uni.getStorageSync("dddddd") - expect(ret).toEqual(true) - uni.setStorageSync("dddddd",false) - ret = uni.getStorageSync("dddddd") - expect(ret).toEqual(false) - } - }) - - - uni.setStorage({ - key: "dddddd", - data: "海上生明月,天涯共此时,情人怨遥夜,竟夕起相思。", - complete: (res) => { - console.log(res) - let ret = uni.getStorageSync("dddddd") - expect(ret).toEqual("海上生明月,天涯共此时,情人怨遥夜,竟夕起相思。") - uni.setStorageSync("dddddd","床前明月光,疑似地上霜") - ret = uni.getStorageSync("dddddd") - expect(ret).toEqual("床前明月光,疑似地上霜") - } - }) - - - // IOS 打印对象乱序,暂时注释 - // uni.setStorage({ - // key: "dddddd", - // data: { - // "a": 1, - // "b": "2", - // "c": { - // "x": "1", - // "y": true - // } - // }, - // complete: (res) => { - // let ret = uni.getStorageSync("dddddd") - // console.log(ret) - // expect(JSON.stringify(ret)).toEqual('{"a":1,"b":"2","c":{"x":"1","y":true}}') - // } - // }) - }) - - - }) -} \ 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 d8c6b42..9f07ef2 100644 --- a/uni_modules/uts-tests/utssdk/index.uts +++ b/uni_modules/uts-tests/utssdk/index.uts @@ -31,7 +31,6 @@ export function runTests() : UTSJSONObject { const MathRes = testMath(); const RegExpRes = testRegExp(); const KeyWordRes = testKeyWord(); - const extapiRes = testExtapi(); // #ifdef APP-ANDROID // const ReactiveArrayRes = testReactiveArray(); @@ -56,7 +55,6 @@ export function runTests() : UTSJSONObject { Operators: OperatorsRes, Math: MathRes, RegExp: RegExpRes, - KeyWord:KeyWordRes, - extapi:extapiRes + KeyWord:KeyWordRes } } \ No newline at end of file -- GitLab