MCPcopy
hub / github.com/google-labs-code/design.md / buildState

Function buildState

packages/cli/src/linter/linter/handler.test.ts:26–34  ·  view source on GitHub ↗

Helper: parse → build model → return state

(overrides: Partial<ParsedDesignSystem> = {})

Source from the content-addressed store, hash-verified

24
25/** Helper: parse → build model → return state */
26function buildState(overrides: Partial<ParsedDesignSystem> = {}): DesignSystemState {
27 const parsed: ParsedDesignSystem = { sourceMap: new Map(), ...overrides };
28 const result = modelHandler.execute(parsed);
29 const hasErrors = result.findings.some(d => d.severity === 'error');
30 if (hasErrors) {
31 throw new Error(`Model build failed: ${result.findings.map(d => d.message).join(', ')}`);
32 }
33 return result.designSystem;
34}
35
36describe('LinterHandler', () => {
37

Callers 1

handler.test.tsFile · 0.70

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…