End a Console test only after async callback finishes; this issue was missed in
When this is not done correctly, the test error is
```
qpid-dispatch/qpid-dispatch/console/react/node_modules/react-dom/cjs/react-dom.development.js:3905
var evt = document.createEvent('Event');
^
TypeError: Cannot read property 'createEvent' of null
```
@@ -23,7 +23,7 @@ import { service, login, TEST_PORT } from "../serviceTest";
import { LocalStorageMock } from "@react-mock/localstorage";
import ChordViewer from "./chordViewer";
-it("renders the ChordViewer component", () => {
+it("renders the ChordViewer component", (done) => {
const props = {
service,
};
@@ -63,5 +63,7 @@ it("renders the ChordViewer component", () => {
// after 1 update period, the B chord should be in the svg
await waitFor(() => expect(getByLabelText("B")).toBeInTheDocument());
- });
+
+ done();
+ })
});
