gun/test/test.panic.js
2016-04-01 17:04:05 -07:00

18 lines
454 B
JavaScript

test(function(){
this.just("Alice", function(test){
var gun = Gun('http://localhost:8080/gun');
gun.put({hello: 'world'}).key('test', test._terminate.bind(test));
});
this.just("Bob", function(test){
var gun = Gun('http://localhost:8080/gun');
gun.get('test').val(function(data){
if(data.hello === 'world'){
test.done();
} else {
test.fail("Data was corrupted");
}
});
setTimeout(test.fail.bind("Timeout!"),500);
});
});