it("calls #loadCities if the zipCode is correct and there are 1+ chars in the field", async () => { // This is how to test watchers: // 1. set the starting data if neccessary wrapper.setData({ searchTermCity: "", address: { zipCode: "12345" } }); // 2. Change the current value wrapper.vm.searchTermCity = "Ha"; // 3. Manually trigger watcher since vue-test-utils doesn't do that anymore:( wrapper.vm._watchers.find(w => w.expression === "searchTermCity").run(); expect(wrapper.vm.loadCities).toHaveBeenCalledWith("Ha"); });