What is the basic idea of vue unit testing?

preliminary writing, it feels like a detour, (in the unit test you want to pass the external api of vuex"s action and then verify it).
I have a few questions:
1. Unit tests do not require external api. As long as the data can run on mock?
2. (in the unit test, access the external api through vuex"s action to get the results and verify the tobe not tobe.) does this approach go too far?

Apr.25,2022

  1. Yes, you need to specify the scope you are testing, as long as you ensure that the component behaves as expected under the correct or expected exception data
  2. api should not be needed by cover for front-end unit tests. For reasons, see 1 import js API should write interface tests separately at the back end. If there is complex logic in vuex, you can test the corresponding methods in a separate import js file without the process of testing data from vuex to components, which is meaningless
  3. .
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-1b357a8-2b2fe.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-1b357a8-2b2fe.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?