From c9eec350ed172791899ed2360342d9aaeff81ca1 Mon Sep 17 00:00:00 2001 From: hedrall Date: Fri, 25 Feb 2022 06:59:37 +0900 Subject: [PATCH] fix uuid when test --- src/util.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util.ts b/src/util.ts index 7751afca..f482e27c 100644 --- a/src/util.ts +++ b/src/util.ts @@ -9,7 +9,9 @@ export function getMotionName(prefixCls: string, transitionName?: string, animat // ================================ UUID ================================ let uuid = -1; +const isTest = process.env.NODE_ENV === 'test'; export function getUUID() { + if (isTest) return 0; uuid += 1; return uuid; }