提交 991eee47 编写于 作者: 杜庆泉's avatar 杜庆泉

remove extapi test case

上级 86db42bc
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
...@@ -31,7 +31,6 @@ export function runTests() : UTSJSONObject { ...@@ -31,7 +31,6 @@ export function runTests() : UTSJSONObject {
const MathRes = testMath(); const MathRes = testMath();
const RegExpRes = testRegExp(); const RegExpRes = testRegExp();
const KeyWordRes = testKeyWord(); const KeyWordRes = testKeyWord();
const extapiRes = testExtapi();
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
// const ReactiveArrayRes = testReactiveArray(); // const ReactiveArrayRes = testReactiveArray();
...@@ -56,7 +55,6 @@ export function runTests() : UTSJSONObject { ...@@ -56,7 +55,6 @@ export function runTests() : UTSJSONObject {
Operators: OperatorsRes, Operators: OperatorsRes,
Math: MathRes, Math: MathRes,
RegExp: RegExpRes, RegExp: RegExpRes,
KeyWord:KeyWordRes, KeyWord:KeyWordRes
extapi:extapiRes
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册