diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 00645ccc222bb40421260dfc35fbf1d5682b4a71..3988248ea91a6642d964a7535211902075e1f3e6 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -223,7 +223,7 @@ export function testNumber() : Result { expect((new UTSNumber(0.000001)).toString()).toEqual("0.000001"); expect((new UTSNumber(0.0000001)).toString()).toEqual("1e-7"); expect((new UTSNumber(100000000000000000000.0)).toString()).toEqual("100000000000000000000"); - expect((new UTSNumber(1000000000000000000000.0)).toString()).toEqual("1e21"); + expect((new UTSNumber(1000000000000000000000.0)).toString()).toEqual("1e+21"); // #endif }) diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 26e16fb41b718e8d1ed686154d58b11048e485b8..c74ee7ec9ffaeac0a0320a30d8b6a89789842410 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -1,5 +1,5 @@ import { describe, test, expect, expectNumber, Result } from './tests.uts' - +import {mockData} from './data.uts' export function testUTSJSONObject() : Result { @@ -10,7 +10,8 @@ export function testUTSJSONObject() : Result { age:11 } expect(UTSJSONObject.keys(obj).length).toEqual(2); - console.log(UTSJSONObject.keys(obj)) + expect(UTSJSONObject.keys(mockData).length).toEqual(2); + }) test('toJSONObject', () => { diff --git a/uni_modules/uts-tests/utssdk/data.uts b/uni_modules/uts-tests/utssdk/data.uts new file mode 100644 index 0000000000000000000000000000000000000000..08bf9e46a176bcbf0bd0637bc852aab27f9a386a --- /dev/null +++ b/uni_modules/uts-tests/utssdk/data.uts @@ -0,0 +1,6 @@ +const mockData = { + username:"lucy", + age:12 +} + +export {mockData}