From dd21b72193174a9cdde56839f978712eb34b3b95 Mon Sep 17 00:00:00 2001 From: maojunxyz Date: Fri, 8 Aug 2025 18:04:36 +0800 Subject: [PATCH] test: Add JSONP notation test case for JSON Repair operation - Add test case to verify JSONP callback wrapper removal - Validates that callback({name: John, age: 30}) becomes {name: John, age: 30} - Ensures comprehensive coverage of jsonrepair library features - Total test cases now: 12 (previously 11) --- tests/operations/tests/JSONRepair.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/operations/tests/JSONRepair.mjs b/tests/operations/tests/JSONRepair.mjs index 06d4263c..46768df9 100644 --- a/tests/operations/tests/JSONRepair.mjs +++ b/tests/operations/tests/JSONRepair.mjs @@ -161,4 +161,15 @@ TestRegister.addTests([ }, ], }, + { + name: "JSON Repair: JSONP notation", + input: 'callback({"name": "John", "age": 30})', + expectedOutput: '{"name": "John", "age": 30}', + recipeConfig: [ + { + op: "JSON Repair", + args: [], + }, + ], + }, ]);