exports['test put atom'] = function (assert, done) { var peers = utils.createPeers({}); Q.when(Q.put(peers.remote, 'foo', 'bar'), function(value) { assert.equal(peers.object.foo, 'bar', 'value of target has changed'); }); Q.when(Q.get(peers.remote, 'foo'), function(value) { assert.equal(value, peers.object.foo, 'received value mathes actual value'); done(); }, function(reason) { assert.fail(reason); done(); }); }
var chrome, addon, ID = 0; var { Vat } = require("vats"); var Q = require("q"); var vat = Vat('tabs'); console.log('vat>', vat) var tab = Q.get(vat, '0'); Q.when(Q.put(tab, 'url', 'data:text/html,<h1>Hello vat!</h1>'), function() { console.log('look at the tab!!'); }, function(reason) { console.error('failure: ' + reason); })