From 7caf35043c0e0b7508c9ccce710d4c3c22f5ef73 Mon Sep 17 00:00:00 2001 From: Tao Date: Wed, 25 Sep 2024 10:09:40 +0800 Subject: [PATCH] [16534][test] Improve unit test --- .../server/master/utils/SwitchTaskUtilsTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/utils/SwitchTaskUtilsTest.java b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/utils/SwitchTaskUtilsTest.java index a8e50866fc1e..81b8b1bc9c99 100644 --- a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/utils/SwitchTaskUtilsTest.java +++ b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/utils/SwitchTaskUtilsTest.java @@ -77,6 +77,10 @@ public void testIncludes() throws ScriptException { String content = "['abc','def'].includes('abc')"; boolean result = SwitchTaskUtils.evaluate(content); Assertions.assertTrue(result); + + SwitchTaskUtils.evaluate(SwitchTaskUtils.NASHORN_POLYFILL_ARRAY_PROTOTYPE_INCLUDES); + result = SwitchTaskUtils.evaluate(content); + Assertions.assertTrue(result); } }