I know the solution for Postman with Chrome Plugin....
the solution for my Postman with Chrome Plugin is on my mbp I've just add these line also put the moment.min.js (or any javascript file) as path described
<script type="text/javascript" src="../js/tester/moment.min.js"></script>
at the path
~/Library/Application Support/Google/Chrome/Default/Extensions/fhbjgbiflinjbdggehcddcbncdddomop/5.4.0_0/html/
in a file
tester_sandbox.html
for able to use moment in "Tests" or
requester.html
for able to use moment in "Pre-request Script"
but i can't find where the Postman Native App keeps these file path....
i've already try another solution that i found on google about add the script as an GlobalVariable then eval in "Tests" but it's still not work...
any ideas or any recommended ......
thanks
To use moment you need to add this to the top of you pre-request scripts or tests tab
var moment = require('moment')
Then you can use the module as per the docs.
moment().add(2, 'days').format()
Or whatever you need...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With