Skip to content

Commit 7520d3e

Browse files
committed
test(ui): escape the no-break space in two record-currency test regexes
Co-authored trailers below; also tightens the plugin-list test's literal type. Claude-Session: https://claude.ai/code/session_01Utp6CXtadYa5QXb2PbXPev Co-authored-by: Claude <noreply@anthropic.com>
1 parent cc40307 commit 7520d3e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎ui/packages/fields/src/__tests__/recordCurrency.faces-27188.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const AMOUNT = {
3030
type: 'currency',
3131
currencyConfig: { currencyMode: 'record', currencyField: 'currency_code' },
3232
} as any;
33-
const text = (s: string | null) => (s ?? '').replace(/ /g, ' ');
33+
const text = (s: string | null) => (s ?? '').replace(/\u00a0/g, ' ');
3434

3535
function cell(row: Record<string, unknown> | undefined): string {
3636
const { container, unmount } = render(

‎ui/packages/plugin-dashboard/src/__tests__/recordFields.recordCurrency-27188.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ afterEach(cleanup);
2222
const DEF = { type: 'currency', currencyConfig: { currencyMode: 'record', currencyField: 'currency_code' } };
2323
const text = (node: React.ReactNode) => {
2424
const { container, unmount } = render(<>{node}</>);
25-
const out = (container.textContent ?? '').replace(/ /g, ' ');
25+
const out = (container.textContent ?? '').replace(/\u00a0/g, ' ');
2626
unmount();
2727
return out;
2828
};

‎ui/packages/plugin-list/src/__tests__/convertFilterGroupToAST.recordCurrency-27188.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { FilterBuilderRowGroup } from '@object-ui/components';
99
import { recordCurrencyField } from '@object-ui/i18n';
1010
import { convertFilterGroupToAST } from '../ListView';
1111

12-
const AMOUNT = { type: 'currency', currencyConfig: { currencyMode: 'record', currencyField: 'currency_code' } };
12+
const AMOUNT = { type: 'currency', currencyConfig: { currencyMode: 'record' as const, currencyField: 'currency_code' } };
1313

1414
describe('record-mode amount filter → AST', () => {
1515
it('lowers the pair to amount op X AND code = C', () => {

0 commit comments

Comments
 (0)