Kong / Kong/insomnia

response-Infinity in Tests added

Open
#6,848 1 comment 0 reactions 0 assignees View on GitHub
B-bug S-verified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

Generating test case content with CTRL + space should add something like
```
const response = await insomnia.send();
expect(response.status).to.equal(200);
```

### Actual Behavior

Instead it returns
```
const response-Infinity = await insomnia.send();
expect(response-Infinity.status).to.equal(200);
```

### Reproduction Steps

1. Go to the Tests section
2. open the body of an test, does not matter if new or existing
3. CTRL+SPACE and select a request
4. see the -infinity addtion to the response

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

_No response_

### Insomnia Version

8.4.2

### What operating system are you using?

macOS

### Operating System Version

13.5.2 (22G91)

### Installation method

update in place after download

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in the Tests section's CTRL+SPACE request-selection flow and reproduce the generated test case on macOS. Done means selecting a request produces `const response = await insomnia.send();` and uses `response.status`, without the `-Infinity` suffix.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.