diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index 84a2e007079a6ecd4f3282ed411cc7e4b15e1bab..7265e6d2ff86bb79eedc37d639dd3a52f2263ae0 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -101,8 +101,15 @@ export function testJSON() : Result { expect(JSON.stringify({ x: 5, y: 6 })).toEqual(`{"x":5,"y":6}`); expect(JSON.stringify([3, 'false', false])).toEqual(`[3,"false",false]`); expect(JSON.stringify({})).toEqual('{}'); + expect(JSON.stringify(1002)).toEqual('1002'); + expect(JSON.stringify(1002.202)).toEqual('1002.202'); + expect(JSON.stringify(null)).toEqual('null'); + expect(JSON.stringify(100/0.0)).toEqual('null'); expect(JSON.stringify(true)).toEqual('true'); + expect(JSON.stringify(false)).toEqual('false'); expect(JSON.stringify('foo')).toEqual('"foo"'); + expect(JSON.stringify(Math.PI)).toEqual('3.141592653589793'); + expect(JSON.stringify(Math.E)).toEqual('2.718281828459045'); }) }) } \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/KeyWord.uts b/uni_modules/uts-tests/utssdk/KeyWord.uts index aa9aaba74b178cb9b734b17dd4b1219339f092e1..aeea449069f4ca1a19655e734280ca898ff64fba 100644 --- a/uni_modules/uts-tests/utssdk/KeyWord.uts +++ b/uni_modules/uts-tests/utssdk/KeyWord.uts @@ -20,6 +20,9 @@ export function testKeyWord(): Result { expect(typeof(new1)).toEqual('object') expect(typeof(123456.789)).toEqual('number') expect(typeof("hello world")).toEqual('string') + console.log(typeof([1,2,3])) + let arr1 = new Array() + console.log(arr1) })