Explorar el Código

clean up onClick test

Kirk Trombley hace 4 años
padre
commit
e27b5b1f27
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      client/src/tests/GuessPane.test.js

+ 1 - 1
client/src/tests/GuessPane.test.js

@@ -50,7 +50,7 @@ describe("GuessPane", () => {
     });
     // check submit enabled
     expect(handle).toMatchSnapshot();
-    await handle.find("button").first().prop("onClick")();
+    await handle.find("button").first().simulate("click");
     expect(reverseGeocode).toHaveBeenCalledWith(
       expect.objectContaining({ lat: "lat", lng: "lng" })
     );