Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

Commit 4143a03

Browse files
committed
test(app-shell): type the untyped gate-script import the way sibling suites do (objectui#11801)
Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z Co-authored-by: Claude <noreply@anthropic.com>
1 parent fe632eb commit 4143a03

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/app-shell/src/views/studio-design/StudioDesignSurface.zhPillarNames-11801.test.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ import { describe, it, expect, vi, afterEach } from 'vitest';
4545
import { render, screen, fireEvent, cleanup, waitFor } from '@testing-library/react';
4646
import { MemoryRouter } from 'react-router-dom';
4747
import { I18nProvider } from '@object-ui/i18n';
48+
// @ts-expect-error — plain-JS gate script, intentionally untyped (`allowJs: false`)
4849
import { readDesignerPairs } from '../../../../../scripts/check-i18n-designer-table-parity.mjs';
4950

51+
/** Local annotation, since the import above is untyped — the call site stays checked. */
52+
const readTables: (root: string) => Map<string, Map<string, string>> = readDesignerPairs;
53+
5054
const objectDef = {
5155
name: 'showcase_task',
5256
label: 'Task',
@@ -99,7 +103,7 @@ const ZH_DATA = t('engine.studio.pillar.data', 'zh-CN');
99103

100104
describe('zh-CN names a pillar by its tab label (objectui#11801)', () => {
101105
it('no zh value in the designer string tables says 支柱', () => {
102-
const tables = readDesignerPairs(REPO_ROOT) as Map<string, Map<string, string>>;
106+
const tables = readTables(REPO_ROOT);
103107
const zh = tables.get('ENGINE_STRINGS_ZH');
104108
// Lit control: the extractor reads the table `t()` serves.
105109
expect(zh?.get('engine.studio.pillar.data')).toBe(ZH_DATA);

0 commit comments

Comments
 (0)