Skip to content

Commit 2dce8e6

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

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/integration/tsgen.integration.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ describe("Integration Test for tsgen command", () => {
122122
);
123123
}
124124

125-
expect(result.stderr).toContain("Error: No token found"); // Check error message
125+
// Check both stdout and stderr for the error message (CI vs local environment difference)
126+
expect(result.stderr + result.stdout).toContain("Error: No token found");
126127
});
127128

128129
// Test case 6: Generate TypeScript types for GraphQL API
@@ -195,9 +196,14 @@ describe("Integration Test for tsgen command", () => {
195196
"CI Environment - stderr content:",
196197
JSON.stringify(result.stderr),
197198
);
199+
console.log(
200+
"CI Environment - stdout content:",
201+
JSON.stringify(result.stdout),
202+
);
198203
}
199204

200-
expect(result.stderr).toContain("Error: No token found"); // Check error message
205+
// Check both stdout and stderr for the error message (CI vs local environment difference)
206+
expect(result.stderr + result.stdout).toContain("Error: No token found");
201207
});
202208

203209
afterEach(() => {

0 commit comments

Comments
 (0)