From 086cfd19659461a8629017fd0dddbaf42fefef57 Mon Sep 17 00:00:00 2001 From: allenve Date: Wed, 8 Nov 2023 17:08:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A5=E5=85=85=20uuid=20=E5=8D=95?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-formula/__tests__/evalute.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/amis-formula/__tests__/evalute.test.ts b/packages/amis-formula/__tests__/evalute.test.ts index 32d23b1e5..25a7e875f 100644 --- a/packages/amis-formula/__tests__/evalute.test.ts +++ b/packages/amis-formula/__tests__/evalute.test.ts @@ -563,6 +563,11 @@ test('evalute:Math', () => { expect(evaluate('${POW(2, infinity)}', data)).toBe(data.infinity); }); +test('evalute:UUID', () => { + expect(evaluate('${UUID()}', {}).length).toBe(32); + expect(evaluate('${UUID(8)}', {}).length).toBe(8); +}); + test('evalute:namespace', () => { localStorage.setItem('a', '1'); localStorage.setItem('b', '2');