[PR #2853] [CLOSED] feat: Ability to test headers in test request #4112

Closed
opened 2026-03-17 01:40:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2853
Author: @BirnadinErick
Created: 11/14/2022
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • 4bca57a chore: updated tech stack list
  • 4121bde update devcontainer.json to include ssh feature
  • f92e3f2 feat: add toHaveHeaderValue function to pwAPI

📊 Changes

6 files changed (+172 additions, -6 deletions)

View changed files

📝 .devcontainer/devcontainer.json (+4 -1)
📝 README.md (+1 -1)
📝 packages/hoppscotch-app/src/helpers/editor/extensions/HoppEnvironment.ts (+3 -3)
📝 packages/hoppscotch-app/src/helpers/terndoc/pw-test.json (+2 -1)
packages/hoppscotch-js-sandbox/src/__tests__/testing/expect/toHaveHeaderValue.spec.ts (+93 -0)
📝 packages/hoppscotch-js-sandbox/src/test-runner.ts (+69 -0)

📄 Description

Closes #2852

Description

This PR includes commit to add shortcut method to test for headers and their value from the response in test scripts. This function also supports negation with not

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

Now, a test to the header can be done as followed...
hoppscotch_toHaveHeaderValue


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2853 **Author:** [@BirnadinErick](https://github.com/BirnadinErick) **Created:** 11/14/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`4bca57a`](https://github.com/hoppscotch/hoppscotch/commit/4bca57a20dc599a9f7691ef5f0061a8a6dc17fc9) chore: updated tech stack list - [`4121bde`](https://github.com/hoppscotch/hoppscotch/commit/4121bdebeca57481be9a8960f30ca5ad44b5a048) update devcontainer.json to include ssh feature - [`f92e3f2`](https://github.com/hoppscotch/hoppscotch/commit/f92e3f28406a1d3e448b84069e93dfa688472c03) feat: add toHaveHeaderValue function to pwAPI ### 📊 Changes **6 files changed** (+172 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `.devcontainer/devcontainer.json` (+4 -1) 📝 `README.md` (+1 -1) 📝 `packages/hoppscotch-app/src/helpers/editor/extensions/HoppEnvironment.ts` (+3 -3) 📝 `packages/hoppscotch-app/src/helpers/terndoc/pw-test.json` (+2 -1) ➕ `packages/hoppscotch-js-sandbox/src/__tests__/testing/expect/toHaveHeaderValue.spec.ts` (+93 -0) 📝 `packages/hoppscotch-js-sandbox/src/test-runner.ts` (+69 -0) </details> ### 📄 Description Closes #2852 ### Description This PR includes commit to add shortcut method to test for headers and their value from the response in test scripts. This function also supports negation with `not` ### Checks - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information Now, a test to the header can be done as followed... ![hoppscotch_toHaveHeaderValue](https://user-images.githubusercontent.com/45619033/201560485-0f188d3f-fe98-40d1-a953-0f4dbee8f16b.PNG) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:40:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4112
No description provided.