var testSuite1 = (function(){

  var data = obs();

  return passage('Test suite #1')

  .add('obs() is a function', function(done, equals){
    done(typeof obs === 'function');
  })

  .add('data is a function', function(done, equals){
    done(typeof data === 'function');
  })

  .add('data is empty', function(done, equals){
    done(equals(data(), {}));
  })

  .add('undefined property', function(done, equals){
    done(equals(data('a'), undefined));
  })

  .add('set property', function(done, equals){
    done(equals(data('a', 9), 9));
  })

  .add('get property', function(done, equals){
    done(equals(data('a'), 9));
  })

  .add('data is set', function(done, equals){
    done(equals(data(), {a: 9}));
  })

  .add('load data', function(done, equals){
    data({b: 3, c: 5})
    done(equals(data(), {b: 3, c: 5}));
  })

  .add('clear property', function(done, equals){
    data('b', undefined);
    done(equals(data('b'), undefined));
  })

  // observer
  // unregister
  // this in observer
  // computable
  // this in computable
  // computable data object
  // notify all observers again
  // message passing
  // only if different

// get an observable copy
//var observableCopy = obs()(data(null));

// refresh all registered observers
//data(data(null));

// clear all data
//data({});

  // equals function
})();

/* run */

testSuite1.onprogress = function(progress){
  if(!progress.running){
    console.log(progress.name + ': Passed ' + progress.passed + ' of ' + progress.total);
  }
}

testSuite1.run();
@@ -1,22 +1,17 @@
 var test
-Suite1
+s
  = (func
@@ -62,21 +62,19 @@
 ge('
-Test suite #1
+obs() tests
 ')%0A%0A
@@ -949,57 +949,990 @@
 %0A%0A  
-// observer%0A  // unregister%0A  // this in observer
+.add('clear all data', function(done, equals)%7B%0A    data(%7Bg: 7%7D);%0A    data(%7B%7D);%0A    done(equals(data(), %7B%7D));%0A  %7D)%0A%0A  .add('observe', function(done, equals)%7B%0A    var observed = %5B%5D, unregister;%0A    function listen(prop, value)%7B%0A      observed.push(prop, value);%0A    %7D%0A    data(%7B%7D);%0A    unregister = data(listen);%0A    data('f', 9);%0A    unregister();%0A    done(equals(observed, %5B%22f%22, 9%5D));%0A  %7D)%0A%0A  .add('unregister', function(done, equals)%7B%0A    var observed = %5B%5D, unregister;%0A    function listen(prop, value)%7B%0A      observed.push(prop, value);%0A    %7D%0A    data(%7B%7D);%0A    data('d', 7);%0A    unregister = data(listen);%0A    data('d', 6);%0A    data('b', 4);%0A    data('d', 6);%0A    unregister();%0A    data('b', 2);%0A    done(equals(observed, %5B%22d%22, 6, %22b%22, 4, %22d%22, 6%5D));%0A  %7D)%0A%0A  .add('this keyword in observers', function(done, equals)%7B%0A    var that;%0A    function listen()%7B%0A      that = this;%0A    %7D%0A    unregister = data(listen);%0A    data(%7Bp: 4%7D);%0A    unregister();%0A    done(equals(that, data));%0A  %7D)%0A
 %0A  /
@@ -2234,29 +2234,8 @@
 );%0A%0A
-  // equals function%0A
 %7D)()
@@ -2252,22 +2252,17 @@
 */%0A%0Atest
-Suite1
+s
 .onprogr
@@ -2417,14 +2417,9 @@
 test
-Suite1
+s
 .run

Update tests/tests.js