Skip to content

Commit 60fe9b9

Browse files
author
naman-contentstack
committed
added debug log to check failing test cases
1 parent 3674b50 commit 60fe9b9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/integration/tsgen.integration.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ describe("Integration Test for tsgen command", () => {
113113
const result = spawnSync(cmd, args, { encoding: "utf-8" });
114114

115115
expect(result.status).not.toBe(0); // Command should fail
116+
117+
// Log the actual error output to debug GitHub Actions issue
118+
if (process.env.CI) {
119+
console.log(
120+
"CI Environment - stderr content:",
121+
JSON.stringify(result.stderr),
122+
);
123+
}
124+
116125
expect(result.stderr).toContain("Error: No token found"); // Check error message
117126
});
118127

@@ -179,6 +188,15 @@ describe("Integration Test for tsgen command", () => {
179188
const result = spawnSync(cmd, args, { encoding: "utf-8" });
180189

181190
expect(result.status).not.toBe(0);
191+
192+
// Log the actual error output to debug GitHub Actions issue
193+
if (process.env.CI) {
194+
console.log(
195+
"CI Environment - stderr content:",
196+
JSON.stringify(result.stderr),
197+
);
198+
}
199+
182200
expect(result.stderr).toContain("Error: No token found"); // Check error message
183201
});
184202

0 commit comments

Comments
 (0)