{"ScriptPreparationCode":null,"TestCases":[{"Name":"Ternary array destructuring","Code":"const valid = true;\r\nconst invalid = false;\r\nconst obj = {\r\n\tvalid: true,\r\n\tinvalid: false,\r\n\tdeep: {\r\n\t\tvalid: true,\r\n\t\tinvalid: false,\r\n\t}\r\n};\r\n\r\nconst arr = [\r\n\t...(valid ? [{test: \u0027content1\u0027}] : []),\r\n\t...(invalid ? [{test: \u0027content2\u0027}] : []),\r\n\t...(obj.valid ? [{test: \u0027content3\u0027}] : []),\r\n\t...(obj.deep?.valid ? [{test: \u0027content4\u0027}] : []),\r\n\t...(obj.invalid ? [{test: \u0027content5\u0027}] : []),\r\n\t...(obj.deep?.invalid ? [{test: \u0027content6\u0027}] : []),\r\n \t...(obj.nondef?.valid ? [{test: \u0027content7\u0027}] : []),\r\n \t...(obj.nondef?.invalid ? [{test: \u0027content8\u0027}] : []),\r\n];","IsDeferred":false},{"Name":"if \u002B push","Code":"const valid = true;\r\nconst invalid = false;\r\nconst obj = {\r\n\tvalid: true,\r\n\tinvalid: false,\r\n\tdeep: {\r\n\t\tvalid: true,\r\n\t\tinvalid: false,\r\n\t}\r\n};\r\n\r\nconst arr = [];\r\n\r\nif(valid) {\r\n\tarr.push({test: \u0027content1\u0027});\r\n}\r\n\r\nif(invalid) {\r\n\tarr.push({test: \u0027content2\u0027});\r\n}\r\n\r\nif(obj.valid) {\r\n\tarr.push({test: \u0027content3\u0027});\r\n}\r\n\r\nif (obj.deep?.valid) {\r\n\tarr.push({test: \u0027content4\u0027});\r\n}\r\n\r\nif (obj.invalid) {\r\n\tarr.push({test: \u0027content5\u0027});\r\n}\r\n\r\nif (obj.deep?.invalid) {\r\n\tarr.push({test: \u0027content6\u0027});\r\n}\r\n\r\nif (obj.nondef?.valid) {\r\n arr.push({test: \u0027content7\u0027});\r\n}\r\n\r\nif (obj.nondef?.invalid) {\r\n arr.push({test: \u0027content8\u0027});\r\n}","IsDeferred":false}]}