I can't access functions of the wrapper.vm in the unit tests once my component become async on the top-level (needed to use <suspense> feature).
<script setup lang="ts">
const state = reactive({ text: '' });
// -------
// How it was before
const addition = '3';  // <-- This works 
// This is what I want!!!!!
const addition = await Promise.resolve('3'); // <-- This "await" doesn't let me access `wrapper.vm.getText()` in unit tests (undefined)
// -------
function getText(): string {
  return '12' + addition;
}
</script>
<template>
  <section class="foo">
    <button @click="getText()">{{ state.text }}</button>
  </section>
</template>
This is how I'm trying to test getText():
describe('some', () => {
  describe('getText', () => {
    it('should return "123"', async () => {
      const wrapper = mount(Some);
      await flushPromises();
      const result = wrapper.vm.getText(); // <--- "getText()" is udnefined!!! 
      expect(result).toBe('123');
    });
  });
});
So, how to access getText() in unit-tests? I use vitest btw.
I know some solutions to test the html, but they aren't letting me to access functions either.
For sure I can test via "click". But what if I need to mock a function?
                        
@eXception, Apologize for the late response, your question is quite incomplete though, we usually mention the dev stack like:
However, I believe;
try to check issues/1770#issuecomment-1245751892
Cheers