diff --git a/pages/composition-api/reactivity/to-raw/to-raw.test.js b/pages/composition-api/reactivity/to-raw/to-raw.test.js new file mode 100644 index 0000000000000000000000000000000000000000..9147fe424a0d05853ecbf27a628cad985e7a3e70 --- /dev/null +++ b/pages/composition-api/reactivity/to-raw/to-raw.test.js @@ -0,0 +1,31 @@ +const PAGE_PATH = '/pages/composition-api/reactivity/to-raw/to-raw' + +describe('toRaw', () => { + if (process.env.uniTestPlatformInfo.startsWith('android')) { + let page = null + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor('view') + }) + it('basic', async () => { + const checkToRawRef = await page.$('#check-to-raw-ref') + expect(await checkToRawRef.text()).toBe('check toRaw ref: false') + + const checkToRawReactive = await page.$('#check-to-raw-reactive') + expect(await checkToRawReactive.text()).toBe('check toRaw reactive: true') + + const checkToRawReadonly = await page.$('#check-to-raw-readonly') + expect(await checkToRawReadonly.text()).toBe('check toRaw readonly: true') + + const checkToRawShallowReactive = await page.$('#check-to-raw-shallow-reactive') + expect(await checkToRawShallowReactive.text()).toBe('check toRaw shallowReactive: true') + + const checkToRawShallowReadonly = await page.$('#check-to-raw-shallow-readonly') + expect(await checkToRawShallowReadonly.text()).toBe('check toRaw shallowReadonly: true') + }) + } else { + it('other platform', () => { + expect(1).toBe(1) + }) + } +}) \ No newline at end of file diff --git a/pages/composition-api/reactivity/to-raw/to-raw.uvue b/pages/composition-api/reactivity/to-raw/to-raw.uvue index acad9dd7cf4a43cd2f7a868d1fccf164967f6bae..9a42e4a0a5098298e392ab1c8d4d629e25fc268c 100644 --- a/pages/composition-api/reactivity/to-raw/to-raw.uvue +++ b/pages/composition-api/reactivity/to-raw/to-raw.uvue @@ -1 +1,30 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/tab-bar/composition-api.uvue b/pages/tab-bar/composition-api.uvue index 7ab9bae59d57207a7bd4fac75aee7e5838a6be7e..06954a2f11f6b97f1cbe681f1b81b243a5fef08e 100644 --- a/pages/tab-bar/composition-api.uvue +++ b/pages/tab-bar/composition-api.uvue @@ -191,7 +191,7 @@ { name: 'toRaw', url: 'to-raw', - enable: false, + enable: true, }, { name: 'markRaw',