Is it possible to use local js files in Bruno? #657
-
I am trying to use a simple js file from the request folder and use it in the script section, but the file is not loaded. In the same way, I would like to create another script outside Bruno that can log the requests and responses, just calling the function from a js file, how the picture shows. Is it possible to execute this strategy? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is possible in Bruno :) const helloWorld = require("./test");
helloWorld(); You can also checkout #385 for some script inspirations. |
Beta Was this translation helpful? Give feedback.
-
Thank you @helloanoop, it has worked. |
Beta Was this translation helpful? Give feedback.
This is possible in Bruno :)
I think there is a typo. Your pre-request script should be more like
You can also checkout #385 for some script inspirations.