Exemplo n.º 1
0
 get_for_dir: function (project_dir) {
   if (files.is_app_dir(project_dir))
     return packages.get_for_app(project_dir);
   else if (files.is_package_dir(project_dir))
     // this will need to change when packages are stored in more
     // than one place
     return packages.get(path.basename(project_dir));
   else if (files.is_package_collection_dir(project_dir))
     return packages.get_for_collection(project_dir);
   else
     throw new Error("Unknown project directory type");
 },
Exemplo n.º 2
0
 _.each(fs.readdirSync(collection_dir), function (name) {
   // only take things that are actually packages
   if (files.is_package_dir(path.join(collection_dir, name)))
     api.include_tests(name);
 });
Exemplo n.º 3
0
 var package_dir = files.find_upwards(function (p) {
   return files.is_package_dir(p) || files.is_package_collection_dir(p);
 });