From 9d559b1bfc7091c98deabb1af9145507e00f6c65 Mon Sep 17 00:00:00 2001 From: atticusofsparta Date: Wed, 25 Sep 2024 15:21:32 -0600 Subject: [PATCH] chore(testing): ensure eval outputs properly after evolving the ANT --- test/evolve.test.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/evolve.test.js b/test/evolve.test.js index b0259bb..f5ecc64 100644 --- a/test/evolve.test.js +++ b/test/evolve.test.js @@ -23,7 +23,7 @@ describe('aos Evolve', async () => { ); } - it('should evolve the ant', async () => { + it('should evolve the ant and retain eval ability', async () => { const srcCodeTxIdStub = ''.padEnd(43, '123-test'); const evolveResult = await handle({ Tags: [ @@ -42,6 +42,17 @@ describe('aos Evolve', async () => { const state = JSON.parse(result.Messages[0].Data); assert(state); assert(state['Source-Code-TX-ID'] === srcCodeTxIdStub); + + const evalResult = await handle( + { + Tags: [{ name: 'Action', value: 'Eval' }], + Data: 'Handlers.list', + }, + evolveResult.Memory, + ); + + assert(evalResult.Output.data.output); + assert(evalResult.Output.data.output.includes('evolve')); }); it('should not evolve the ant', async () => {