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

fix: 测试例适配web平台

上级 7c66a5cc
......@@ -30,7 +30,9 @@ import { testTypeFromAppJs, Options } from '@/uni_modules/uts-ios-tests'
import type { TestType } from '@/uni_modules/uts-tests'
// #endif
import { testSyntaxUnion } from '@/uni_modules/uts-test-syntax-union'
import { testBuildinNative } from '@/uni_modules/uts-tests-hybrid'
// #ifdef APP-ANDROID || APP-IOS
import { testBuildinNative } from '@/uni_modules/uts-tests-hybrid'
// #endif
export default {
data() {
return {
......@@ -42,7 +44,9 @@ export default {
},
onReady() {
testSyntaxUnion()
testBuildinNative()
// #ifdef APP-ANDROID || APP-IOS
testBuildinNative()
// #endif
this.test()
},
methods: {
......
......@@ -88,8 +88,11 @@ export function testJSON() : Result {
expect(JSON.stringify(new A2())).toEqual("2")
expect(JSON.stringify(new A3())).toEqual('"json"')
expect(JSON.stringify(new A4())).toEqual('null')
// #ifdef APP-ANDROID || APP-IOS
// js平台toJSON不会递归
expect(JSON.stringify(new A5())!.length).toEqual(28)
expect(JSON.stringify(new A6())!.length).toEqual(28)
// #endif
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册