Skip to content

Commit 3516a75

Browse files
author
naman-contentstack
committed
fix failing test case and enabled test command in workflow
1 parent e7badbe commit 3516a75

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
node-version: ${{ matrix.node-version }}
2626
- run: npm ci
2727
- run: npm run build --if-present
28-
# - run: npm test
28+
- run: npm test

tests/integration/tsgen.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("Integration Test for tsgen command", () => {
2828

2929
const generatedContent = fs.readFileSync(outputFilePath, "utf8");
3030
expect(generatedContent).toContain("interface"); // Verify TypeScript interface presence
31-
expect(generatedContent).toMatch(/\/\*\*.*\*\/\n\s*(export)/); // Multi-line comment block check
31+
expect(generatedContent).toMatch(/\/\*\*[\s\S]*?\*\/[\s\S]*?export/); // Multi-line comment block check
3232
});
3333

3434
// Test case 2: Generate TypeScript types with a prefix applied
@@ -61,7 +61,7 @@ describe("Integration Test for tsgen command", () => {
6161
});
6262
}
6363

64-
expect(generatedContent).toMatch(/\/\*\*.*\*\/\n\s*(export)/); // Multi-line comment block check
64+
expect(generatedContent).toMatch(/\/\*\*[\s\S]*?\*\/[\s\S]*?export/); // Multi-line comment block check
6565
});
6666

6767
// Test case 3: Generate TypeScript types without documentation comments

0 commit comments

Comments
 (0)