mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #3590] [bug]: Written tests on payload #1235
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IeuanWalker on GitHub (Nov 23, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3590
Is there an existing issue for this?
Current behavior
Trying to write a test to make sure an array from the payload includes a specific value -

But the test just errors -

Steps to reproduce
Environment
Production
Version
Self-hosted
@liyasthomas commented on GitHub (Nov 24, 2023):
The response doesn't seem to have a
dataproperty. Hence you only needed to usepw.response.body. Can you try this code block and see if it works?@IeuanWalker commented on GitHub (Nov 24, 2023):
@liyasthomas thanks, that worked.
Might want to update the doc to make that clear - https://docs.hoppscotch.io/documentation/getting-started/rest/tests
@liyasthomas commented on GitHub (Nov 25, 2023):
Sorry for the misunderstanding. But the example shown in documentation is correct. The request URL used in the example is;
which produces a response similar to;
Hence the example test script will work.