Skip to content

Instantly share code, notes, and snippets.

@allenluce
Created March 25, 2016 20:03
Show Gist options
  • Save allenluce/5cd48efd4a42db04cb0b to your computer and use it in GitHub Desktop.
Save allenluce/5cd48efd4a42db04cb0b to your computer and use it in GitHub Desktop.
describe('proxy', function () {
it('context', function () {
const sandbox = {
p: new Proxy.ProviderProxy('hey')
}
const context = new vm.createContext(sandbox)
const script = new vm.Script('value = p._get()')
script.runInContext(context)
expect(sandbox.value).to.equal('hey')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment