mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #2647] [feature]: console.log in the Pre-Script #873
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#873
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 @darwinsubramaniam on GitHub (Sep 7, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2647
Is there an existing issue for this?
Current behavior
console.log("HI")added console.log into the pre-request script , was expecting it work as it is simple javascript but it returns error
Steps to reproduce
Environment
Production
Version
Cloud
@CHCoffman commented on GitHub (Sep 7, 2022):
I have been working on this but for the post-request test runner where the response body of the request (or whatever else) can be logged to the console. Ex: pw.log(pw.response.body) to see the response's body. My code in test-runner.ts is
pw-test.json:
"log" : "fn(value: ?)"Looks like console.log from the test runner to browser is blocked via
pure_funcs: ["console.log", "console.debug", "console.warn"],in nuxt.config.js.When removing "console.log" from pure_funcs, you can now see it in the console. My question: is this important to keep or is this something that can be removed and the log function contributed as a feature?
@AndrewBastin commented on GitHub (Sep 7, 2022):
We are working on this actually and are working towards implementing this and the other features mentioned in this RFC (#2292). This will take some time, but we are making steady progress which can be tracked over here (#2389).
I do realize this blocks some more useful features (for example the
consoleAPI introduction) behind the whole implementation. But we are hoping to complete the entire revamp in a couple of months and hopefully by max before the end of the year.@syamsoul commented on GitHub (Aug 11, 2023):
hi.. just wondering when this feature will be deployed?
@ColdCerealAtWork commented on GitHub (Oct 11, 2023):
This is one of the features that's keeping me on Postman, I utilize the console heavily.
@liyasthomas commented on GitHub (Jan 15, 2024):
Hoppscotch's pre-request scripts and post-request tests have complete compatibility with ECMAScript hence open the developer tools > console log in your browser (usually by pressing
F12orCtrl/Cmd+Shift+I) to view logs.Thanks for your patience and valuable feedback. This feature has been implemented in the latest release.
Closing this ticket as this feature is now available in the recent version. Please feel free to reach out if you have any other concerns.