diff --git a/uni_modules/uts-tests/utssdk/Extapi.uts b/uni_modules/uts-tests/utssdk/Extapi.uts deleted file mode 100644 index 58c9484e090d4667fe895f9256a59b14b508403d..0000000000000000000000000000000000000000 --- 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 d8c6b4219eb5470ea674d9177a99d05b40ac5e34..9f07ef2f6baf1b145f4adbd300fa1daf5585a629 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