diff --git a/test/base/a_test.json b/test/base/a_test.json index 7f0a80f..577f95b 100644 --- a/test/base/a_test.json +++ b/test/base/a_test.json @@ -383,6 +383,28 @@ "type": "fetch", "resource": "https://raw.githubusercontent.com/jkomoros/prompt-garden/main/seeds/example-basic.json", "method": "POST" + }, + "function-test": { + "type": "function", + "arguments": [ + "arg:message" + ], + "block": { + "type": "log", + "value": { + "type": "var", + "name": "arg:message" + } + } + }, + "call-test": { + "type": "call", + "function": { + "seed": "function-test" + }, + "arguments": { + "arg:message": "Test" + } } } } \ No newline at end of file diff --git a/test/base/test.ts b/test/base/test.ts index 9e16d7c..c5564a0 100644 --- a/test/base/test.ts +++ b/test/base/test.ts @@ -960,6 +960,14 @@ Suffix`; assert.deepStrictEqual(actual,golden); }); + it('function/call test', async () => { + const garden = loadTestGarden(); + const seed = await garden.seed('call-test'); + const actual = await seed.grow(); + const golden = 'Test'; + assert.deepStrictEqual(actual, golden); + }); + }); describe('expandSeedPacket tests', () => {