Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

424 B
Raw Blame
import { getInputKeys } from '../index'

describe('getInputKeys', () => {
  it('extracts unique variable keys in their first appearance order', () => {
    expect(getInputKeys('Hello {{user_1}}, {{name}}, {{user_1}} and {{user_2}}')).toEqual([
      'user_1',
      'name',
      'user_2',
    ])
  })

  it.each(['plain text', ''])('returns no keys for %j', (input) => {
    expect(getInputKeys(input)).toEqual([])
  })
})