MCPcopy Index your code
hub / github.com/simstudioai/sim / evaluateCondition

Function evaluateCondition

apps/sim/blocks/utils.test.ts:96–102  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

94
95describe('getApiKeyCondition / shouldRequireApiKeyForModel', () => {
96 const evaluateCondition = (model: string): boolean => {
97 const conditionFn = getApiKeyCondition()
98 const condition = conditionFn({ model })
99 if ('not' in condition && condition.not) return false
100 if (condition.value === '__no_model_selected__') return false
101 return true
102 }
103
104 beforeEach(() => {
105 vi.clearAllMocks()

Callers 1

utils.test.tsFile · 0.85

Calls 1

getApiKeyConditionFunction · 0.90

Tested by

no test coverage detected