Skip to content

🎥 Make videos programmatically with React

add elem to parse

Alex Fernandezabda86b8d503
diff --git a/packages/it-tests/src/monorepo/php-package.test.ts b/packages/it-tests/src/monorepo/php-package.test.ts
index 8a35b0b279..a4cb1e88aa 100644
--- a/packages/it-tests/src/monorepo/php-package.test.ts
+++ b/packages/it-tests/src/monorepo/php-package.test.ts
@@ -52,13 +52,14 @@ test("PHP package should create the same payload as normal Lambda package", asyn
codec: "h264",
});
- const raw = toParse.substring(
- toParse.lastIndexOf("(100%)"),
+ const startMarker = "(100%)";
+ const jsonOutput = toParse.substring(
+ toParse.lastIndexOf(startMarker) + startMarker.length,
toParse.lastIndexOf("}") + 1
);
- console.log("show php output raw");
- console.log(raw);
- const parsedJson = JSON.parse(raw);
+ console.log("The element to parse");
+ console.log(jsonOutput);
+ const parsedJson = JSON.parse(jsonOutput);
expect(JSON.stringify(parsedJson, null, 3)).toEqual(
JSON.stringify(nativeVersion, null, 3)