Skip to content

Commit

Permalink
Test unmounting Admin component
Browse files Browse the repository at this point in the history
  • Loading branch information
lundberg committed Mar 18, 2019
1 parent 6ac3f24 commit bc65c99
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ test("Has App", () => {
expect(typeof Bananas.App).toBe("function");
});

test("Can unmount", async () => {
const { app } = await renderApp({ anonymous: true });
expect(window.bananas).toBeDefined();

cleanup();

expect(window.bananas).toBeUndefined();
expect(app.router).toBeUndefined();
expect(app.swagger).toBeUndefined();
expect(app.api).toBeUndefined();
});

test("Can boot and login", async () => {
const { container, getByText, getByLabelText } = await renderApp({
anonymous: true,
Expand Down

0 comments on commit bc65c99

Please sign in to comment.