From 60ff6bd993155f632e6ddbbd93af3d1e7dd4b6b2 Mon Sep 17 00:00:00 2001 From: freakzlike Date: Thu, 25 Aug 2022 09:43:23 +0200 Subject: [PATCH] chore: Extend expose tests with not used function (#1735) chore: Extend expose tests with not used function --- tests/components/ScriptSetup_Expose.vue | 6 +++++- tests/expose.spec.ts | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/components/ScriptSetup_Expose.vue b/tests/components/ScriptSetup_Expose.vue index d2dc97d4b..bbe741de9 100644 --- a/tests/components/ScriptSetup_Expose.vue +++ b/tests/components/ScriptSetup_Expose.vue @@ -7,9 +7,13 @@ const count = ref(0) const inc = () => { count.value++ } +const resetCount = () => { + count.value = 0 +} defineExpose({ - count + count, + resetCount }) diff --git a/tests/expose.spec.ts b/tests/expose.spec.ts index 3cec8475c..e2276621e 100644 --- a/tests/expose.spec.ts +++ b/tests/expose.spec.ts @@ -40,6 +40,10 @@ describe('expose', () => { expect(wrapper.html()).toContain('1') // can access `count` as it is exposed via `defineExpose()` expect(wrapper.vm.count).toBe(1) + + wrapper.vm.resetCount() + + expect(wrapper.vm.count).toBe(0) }) it('access vm with