Skip to content

Commit 73e46b9

Browse files
test(vue3): fix Request unmount lifecycle spec
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent a11dd89 commit 73e46b9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/tests/views/FileRequestFlow.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@ describe('Request.vue - File Request Business Logic', () => {
138138

139139
it('clears selected file on destroy', () => {
140140
wrapper = createWrapper()
141-
if (wrapper.vm.$options.beforeUnmount) {
142-
wrapper.vm.$options.beforeUnmount.call(wrapper.vm)
143-
}
141+
wrapper.unmount()
142+
wrapper = undefined as unknown as ReturnType<typeof createWrapper>
144143
expect(mockFilesStore.selectFile).toHaveBeenCalled()
145144
})
146145
})

0 commit comments

Comments
 (0)