postmanlabs/postman-sandbox

Name: postman-sandbox

Owner: Postman

Description: Sandbox for Postman Scripts to run in NodeJS or Chrome

Created: 2016-11-30 08:19:26.0

Updated: 2018-05-24 15:33:29.0

Pushed: 2018-05-24 15:33:31.0

Homepage: null

Size: 643

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Postman Sandbox

Module that unifies execution of third-party JavaScript within Node VM and Browser iFrame.

This module is part of Postman Runtime Core and is not intended for independent use.

If you are looking to execute collections, you should bee using Newman

Usage
Sandbox = require('postman-sandbox'),
context;

box.createContext(function (err, ctx) {
if (err) {
    return console.error(err);
}

ctx.execute(`// code here`, {}, {}, function (err) {
    if (err) {
        return console.error(err);
    }
    console.log('executed')
});

Sandbox Environment

The following section outlines the API available inside sandbox scripts

pm
pre-request script specials test script specials
Events fired from Sandbox
Events responded to

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.