How does vue use jest to test events?

how can I get this event?

helloworld
export default {
  name: "HelloWorld",
  data () {
    return {
      msg: "Welcome to Your Vue.js App"
    }
  },
  methods: {
    num () {
      return a + b
    }
  }
}

import HelloWorld from "@/components/HelloWorld"
test("adds 1 + 2 to equal 3", () => {
  // console.log(, "cc")
  // expect(vm.$options.methods.sum(1, 2)).toBe(3);
});
Jul.25,2021

you need to mount it first, and then call the function directly. Go directly to the vue-test-utils official website to see the test case

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39ef7-2c1de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39ef7-2c1de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?