[REF] move component function to app, improve some code

This commit is contained in:
Géry Debongnie
2022-06-08 11:09:39 +02:00
committed by Sam Degueldre
parent 51538c2fea
commit 0e6059467f
53 changed files with 2522 additions and 1975 deletions
+5 -1
View File
@@ -91,7 +91,11 @@ export function renderToBdom(template: string, context: any = {}, node?: any): B
snapshottedTemplates.add(template);
expect(fn.toString()).toMatchSnapshot();
}
return fn(null as any, blockDom, helpers)(context, node);
const app = {
createComponent() {},
createDynamicComponent() {},
};
return fn(app as any, blockDom, helpers)(context, node);
}
export function renderToString(template: string, context: any = {}, node?: any): string {