rename web into demo

This commit is contained in:
Géry Debongnie
2019-03-14 11:02:14 +01:00
parent 75218b65e7
commit 2ffb0fd64c
1731 changed files with 8 additions and 12 deletions
+28
View File
@@ -0,0 +1,28 @@
import { HomeMenu } from "../../src/ts/ui/home_menu";
import { makeTestEnv, makeTestFixture } from "../helpers";
//------------------------------------------------------------------------------
// Setup and helpers
//------------------------------------------------------------------------------
let fixture: HTMLElement;
beforeEach(() => {
fixture = makeTestFixture();
});
afterEach(() => {
fixture.remove();
});
//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
test("can be rendered", async () => {
const testEnv = makeTestEnv();
const props = { menuInfo: testEnv.store.menuInfo };
const homeMenu = new HomeMenu(testEnv, props);
await homeMenu.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();
});