Skip to content

Commit

Permalink
fix: prevent override of previous test results with region in loop (#664
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AnWeber committed Apr 10, 2024
1 parent 63f89d2 commit d01a6c0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [6.12.2]
### Fix
- test results generated by `@loop` override previous test results for junit output(#664)

## [6.12.1]
### Fix
- provide no duplicate symbols on filter call (Anweber/vscode-httpyac#269)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"publisher": "AnWeber",
"description": "HTTP/REST CLI Client for *.http files",
"version": "6.12.1",
"version": "6.12.2",
"homepage": "https://github.com/AnWeber/httpyac",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/core/execute/processedHttpRegionInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export class ProcessedHttpRegionInterceptor implements HookInterceptor<[models.P
): Promise<boolean | undefined> {
const [context] = hookContext.args;

const processedHttpRegion = context.processedHttpRegions?.find(obj => obj.id === context.httpRegion.id);
const processedHttpRegion = context.processedHttpRegions
?.slice()
.reverse()
?.find(obj => obj.id === context.httpRegion.id);
if (processedHttpRegion) {
processedHttpRegion.end = performance.now();
processedHttpRegion.duration = processedHttpRegion.end - processedHttpRegion.start;
Expand Down

0 comments on commit d01a6c0

Please sign in to comment.