close

  
<p> acre.require('/test/lib').enable(this);

var lib = acre.require("helpers_count");

test("topic_counts", function() {  
  var counts = lib.topic_counts("/film");
  ok(counts["/film"]);
  counts = lib.topic_counts("/people/person", "/business", "/tv", "/foo");
  ok(counts["/people/person"]);  
  ok(counts["/business"]);  
  ok(counts["/tv"]);
  ok(!counts["/foo"]);
});


if (acre.current_script == acre.request.script) {  
  acre.test.report();
}

 </p>

Comments

Hide