test: rename snapshot.test.js to integration.test.js and add testcases#1415
Conversation
|
WalkthroughThe pull request enhances the test suite for client generation from templates by introducing two new test cases. One test verifies that generating a "hoppscotch echo" client without a specified Changes
Sequence Diagram(s)sequenceDiagram
participant T as Test
participant CG as Client Generator
participant FS as File System
T->>CG: Request client generation for "hoppscotch echo" without clientFileName
CG->>CG: Determine default output file
CG->>FS: Generate client file using the default name
FS-->>CG: Confirm file creation
CG-->>T: Return generated client matching snapshot
sequenceDiagram
participant T as Test
participant CG as Client Generator
T->>CG: Request client generation for "hoppscotch echo" without server parameter
CG-->>T: Throw error "Parameter missing: server"
Suggested labels
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| expect(clientOutputFile).toBeDefined(); | ||
|
|
||
| const client = await readFile(clientOutputFile, 'utf8'); | ||
| expect(client).toMatchSnapshot(); |
There was a problem hiding this comment.
no need to do snapshot there
you check only one thing here: if output client name is client.js
so instead of expecting snapshot match - you should just validate if file client.js exists
There was a problem hiding this comment.
@derberg thanks for the guidance : ) Changes done please check.
|
|
/rtm |



Description
a. without clientFileName param
b. without server param
Related issue(s)
Fixes: #1414
Summary by CodeRabbit