Browse Source

test(typert): reject a lookup parameter that accepts undefined

imccyu 2 months ago
parent
commit
ea791827f4
1 changed files with 11 additions and 0 deletions
  1. 11 0
      packages/typert/registry/tests/typert.spec.ts

+ 11 - 0
packages/typert/registry/tests/typert.spec.ts

@@ -508,6 +508,17 @@ describe('TypertRegistry', () => {
         ...invocation(),
         parameters: [{ name: 'agent', wire: 'agentId', source: 'lookup', codec: { mode: 'src-json' } }],
       }, 'has no lookup key'],
+      [{
+        ...invocation(),
+        parameters: [{
+          name: 'agent',
+          wire: 'agentId',
+          source: 'lookup',
+          lookup: 'fixture',
+          acceptsUndefined: true,
+          codec: { mode: 'src-json' },
+        }],
+      }, 'cannot accept undefined'],
       [{
         ...invocation(),
         parameters: [{