Skip to content

Commit ef3ea87

Browse files
committed
test(plugin-security): key the frozen-filter record by the CEL source, as compileCelToFilter types its argument
Claude-Session: https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 78e4f3e commit ef3ea87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/plugins/plugin-security/src/rls-boolean-comparand-door.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ vi.mock('@objectstack/formula', async (importOriginal) => {
6767
const result = real.compileCelToFilter(expression, options);
6868
if (result.ok) {
6969
deepFreeze(result.filter);
70-
compiled.set(expression, [...(compiled.get(expression) ?? []), result.filter]);
70+
const key = typeof expression === 'string' ? expression : (expression.source ?? '');
71+
compiled.set(key, [...(compiled.get(key) ?? []), result.filter]);
7172
}
7273
return result;
7374
}) as typeof real.compileCelToFilter,

0 commit comments

Comments
 (0)