diff --git a/pages/API/get-app/get-app.test.js b/pages/API/get-app/get-app.test.js index 10343798d4c0cfbd9bfc57b139bc05772e2639f6..4d229d7e50354838641cda19b375b92ce2a96666 100644 --- a/pages/API/get-app/get-app.test.js +++ b/pages/API/get-app/get-app.test.js @@ -8,10 +8,16 @@ describe('getApp', () => { }) it('globalData', async () => { await page.callMethod('getGlobalData') - const data = await page.data() + let data = await page.data() expect(data.globalDataStr).toBe('global data str') expect(data.globalDataNum).toBe(123) expect(data.globalDataBool).toBe(true) + await page.callMethod('setGlobalData') + await page.callMethod('getGlobalData') + data = await page.data() + expect(data.globalDataStr).toBe('new global data str') + expect(data.globalDataNum).toBe(456) + expect(data.globalDataBool).toBe(false) }) it('method', async () => { const oldLifeCycleNum = await page.data('lifeCycleNum') diff --git a/pages/API/get-app/get-app.uvue b/pages/API/get-app/get-app.uvue index 737d0975f2b7132a5890cc28d18c1a4ace08ae1b..3b8365dbb86d7db0b9a0d78837cb2aa0c31015f0 100644 --- a/pages/API/get-app/get-app.uvue +++ b/pages/API/get-app/get-app.uvue @@ -2,15 +2,14 @@ - -