[IMP] app: improve API, small refactoring

This commit is contained in:
Géry Debongnie
2021-12-20 17:32:32 +01:00
committed by Mathieu Duckerts-Antoine
parent f4da50d350
commit 0b1c4dd4ef
13 changed files with 112 additions and 87 deletions
@@ -1,4 +1,4 @@
import { App, Component, mount, useState, xml } from "../../src";
import { Component, mount, useState, xml } from "../../src";
import { makeTestFixture, nextTick, snapshotEverything } from "../helpers";
let fixture: HTMLElement;
@@ -64,7 +64,7 @@ describe("basics", () => {
static components = { Child, OtherChild };
}
const env = { options: { flag: true } };
const parent = await new App(Parent).configure({ env }).mount(fixture);
const parent = await mount(Parent, fixture, { env });
expect(fixture.innerHTML).toBe("<span>CHILD 1</span>");
env.options.flag = false;