[REF] component: move template check in constructor

This commit is contained in:
Géry Debongnie
2019-10-07 17:01:55 +02:00
committed by Aaron Bohy
parent e7516be95c
commit cedb1f411f
3 changed files with 31 additions and 17 deletions
+1 -2
View File
@@ -89,9 +89,8 @@ describe("basic widget properties", () => {
test("crashes if it cannot find a template", async () => {
expect.assertions(1);
class SomeWidget extends Component<any, any> {}
const widget = new SomeWidget(env);
try {
await widget.mount(fixture);
new SomeWidget(env);
} catch (e) {
expect(e.message).toBe('Could not find template for component "SomeWidget"');
}