feat: replace CJS require with static imports, add comprehensive layout system tests
This commit is contained in:
@@ -18,7 +18,8 @@ export interface RegisteredComponent {
|
||||
manifest?: ComponentManifest
|
||||
}
|
||||
|
||||
class ComponentRegistry {
|
||||
/** @internal Exported for testing only. */
|
||||
export class ComponentRegistry {
|
||||
private components = new Map<string, RegisteredComponent>()
|
||||
private instanceCache = new Map<string, QuartzComponent>()
|
||||
private optionOverrides = new Map<string, Record<string, unknown>>()
|
||||
@@ -111,6 +112,13 @@ class ComponentRegistry {
|
||||
return results
|
||||
}
|
||||
|
||||
/** @internal For testing only — resets all registry state. */
|
||||
clear(): void {
|
||||
this.components.clear()
|
||||
this.instanceCache.clear()
|
||||
this.optionOverrides.clear()
|
||||
}
|
||||
|
||||
private findCachedInstance(
|
||||
constructor: QuartzComponentConstructor<any>,
|
||||
): QuartzComponent | undefined {
|
||||
|
||||
Reference in New Issue
Block a user