You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/03/27 16:08:29 UTC

[15/51] [partial] CB-6346 - Add node_modules to source control

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
new file mode 100644
index 0000000..74c7533
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
@@ -0,0 +1,62 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir',
+'dir/foo/a/b/z':'file',
+'dir/foo/a/b/c':'dir',
+'dir/foo/a/b/c/w':'file'
+};
+
+test('async events',function(t){
+  var paths = [],
+  files = [],
+  dirs = [];
+
+
+  var emitter = walkdir(__dirname+'/dir/foo',function(path){
+    //console.log('path: ',path);
+    paths.push(path.replace(__dirname+'/',''));
+  });
+
+  emitter.on('directory',function(path,stat){
+    dirs.push(path.replace(__dirname+'/',''));
+  });
+
+  emitter.on('file',function(path,stat){
+    //console.log('file: ',path); 
+    files.push(path.replace(__dirname+'/',''));
+  });
+
+  emitter.on('end',function(){
+
+     files.forEach(function(v,k){
+       t.equals(expectedPaths[v],'file','path from file event should be file');  
+     });
+
+     Object.keys(expectedPaths).forEach(function(v,k){
+       if(expectedPaths[v] == 'file') {
+          t.ok(files.indexOf(v) > -1,'should have file in files array');
+       }
+     });
+
+     dirs.forEach(function(v,k){
+       t.equals(expectedPaths[v],'dir','path from dir event should be dir '+v);  
+     });
+
+     Object.keys(expectedPaths).forEach(function(v,k){
+       if(expectedPaths[v] == 'dir') {
+          t.ok(dirs.indexOf(v) > -1,'should have dir in dirs array');
+       }
+     });
+
+     Object.keys(expectedPaths).forEach(function(v,k){
+       t.ok(paths.indexOf(v) !== -1,'should have found all expected paths '+v);
+     });
+
+     t.end();
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
new file mode 100644
index 0000000..98e852d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
@@ -0,0 +1,33 @@
+var spawn = require('child_process').spawn;
+
+var find = spawn('find',[process.argv[2]||'./']);
+
+var fs = require('fs');
+
+var buf = '',count = 0;
+
+handleBuf = function(data){
+
+	buf += data;
+
+	if(buf.length >= 1024) {
+		var lines = buf.split("\n");
+		buf = lines.pop();//last line my not be complete
+		count += lines.length;
+		process.stdout.write(lines.join("\n")+"\n");
+	}
+};
+
+find.stdout.on('data',function(data){
+	//buf += data.toString();
+	handleBuf(data)
+	//process.stdout.write(data.toString());
+});
+
+find.on('end',function(){
+	handleBuf("\n");
+	console.log('found '+count+' files');
+	console.log('ended');
+});
+
+find.stdin.end();

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
new file mode 100644
index 0000000..526d694
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
@@ -0,0 +1,26 @@
+import os
+import sys
+
+rootdir = sys.argv[1]
+ino = {}
+buf = []
+for root, subFolders, files in os.walk(rootdir):
+
+    for filename in files:
+        filePath = os.path.join(root, filename)
+        try:
+            stat = os.lstat(filePath)
+	except OSError:
+            pass
+
+        inostr = stat.st_ino
+
+        if inostr not in ino:
+            ino[stat.st_ino] = 1 
+	    buf.append(filePath);
+	    buf.append("\n");
+            if len(buf) >= 1024:
+	        sys.stdout.write(''.join(buf))
+		buf = []
+
+sys.stdout.write(''.join(buf));

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
new file mode 100644
index 0000000..b3af43e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
@@ -0,0 +1,15 @@
+var findit = require('findit');
+
+var files = findit.findSync(process.argv[2]||'./');
+
+var count = files.length;
+
+console.log(files);
+
+files = files.join("\n");
+
+process.stdout.write(files+"\n");
+
+console.log('found '+count+' files');
+
+

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
new file mode 100644
index 0000000..d018bf2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
@@ -0,0 +1,14 @@
+var findit = require('findit');
+
+var find = findit.find(process.argv[2]||'./');
+
+var count = 0;
+
+find.on('file',function(path,stat){
+	count++;
+	process.stdout.write(path+"\n");
+});
+
+find.on('end',function(){
+	console.log('found '+count+' regular files');
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
new file mode 100644
index 0000000..1451b4c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
@@ -0,0 +1,24 @@
+var fstream = require('fstream');
+
+var pipe = fstream.Reader(process.argv[2]||"../");
+
+var count = 0,errorHandler;
+
+pipe.on('entry',function fn(entry){
+  if(entry.type == "Directory"){
+  	entry.on('entry',fn);
+  } else if(entry.type == "File") {
+  	count++;
+  }
+  entry.on('error',errorHandler);
+});
+
+pipe.on('error',(errorHandler = function(error){
+	console.log('error event ',error);
+}));
+
+pipe.on('end',function(){
+	console.log('end! '+count);
+});
+
+//this is pretty slow

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
new file mode 100755
index 0000000..5fdd18f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
@@ -0,0 +1 @@
+npm install

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
new file mode 100644
index 0000000..590f9d1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
@@ -0,0 +1,18 @@
+var lsr = require('ls-r');
+
+lsr(process.argv[2]||'./',{maxDepth:500000,recursive:true},function(err,origPath,args){
+	if(err) {
+		console.log('eww an error! ',err);
+		return;
+	}
+//console.log('hit');
+	var c = 0;
+	args.forEach(function(stat){
+		if(stat.isFile()){
+			console.log(stat.path);
+			c++;
+		}
+	});
+
+	console.log('found '+args.length+" regular files");
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
new file mode 100644
index 0000000..1faeff3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
@@ -0,0 +1,10 @@
+{
+  "name":"recursedir-comparisons",
+  "version": "0.0.0",
+  "author": "Ryan Day <so...@gmail.com>",
+  "devDependencies": {
+    "findit": "*",
+    "ls-r":"*",
+    "fstream":"*"
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1 b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2 b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
new file mode 100644
index 0000000..e1346fa
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
@@ -0,0 +1,19 @@
+var test = require('tap').test,
+walk  = require('../walkdir.js');
+
+test('should be able to end walk after first path',function(t){
+
+  var paths = [];
+
+  var em = walk('../',function(path){
+    paths.push(path);
+    this.end();
+  });
+
+  em.on('end',function(){
+    t.equals(paths.length,1,'should have only found one path');
+    t.end();
+  });
+
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
new file mode 100644
index 0000000..ecc9a49
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
@@ -0,0 +1,27 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir'
+};
+
+test('no_recurse option',function(t){
+  var paths = [];
+
+  var emitter = walkdir(__dirname+'/dir/foo',{max_depth:2},function(path,stat,depth){
+    paths.push(path.replace(__dirname+'/',''));
+    t.ok(depth < 3,' all paths emitted should have a depth less than 3');
+  });
+
+  emitter.on('end',function(){
+     var expected = Object.keys(expectedPaths);
+     paths.forEach(function(v){ 
+          t.ok(expected.indexOf(v) > -1,'paths should not have any unexpected files');
+     });
+
+     t.end();
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
new file mode 100644
index 0000000..df2e4ed
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
@@ -0,0 +1,25 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir'
+};
+
+test('no_recurse option',function(t){
+  var paths = [];
+
+  var emitter = walkdir(__dirname+'/dir/foo',{no_recurse:true},function(path,stat,depth){
+    paths.push(path.replace(__dirname+'/',''));
+    t.ok(depth === 1,' all paths emitted should have a depth of 1');
+  });
+
+  emitter.on('end',function(){
+     var expected = Object.keys(expectedPaths);
+     paths.forEach(function(v){ 
+          t.ok(expected.indexOf(v) > -1,'all expected files should be in paths');
+     });
+
+     t.end();
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
new file mode 100644
index 0000000..13ba6e4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
@@ -0,0 +1,34 @@
+var test = require('tap').test,
+fs = require('fs'),
+path = require('path'),
+walk  = require('../walkdir.js');
+
+test('should not emit fail events for empty dirs',function(t){
+  fs.mkdir('./empty',function(err,data){
+    if(err) {
+      t.equals(err.code,'EEXIST','if error code on mkdir for fixture it should only be because it exists already');
+    }
+
+    var paths = [];
+    var dirs = [];
+    var emptys = [];
+    var fails = [];
+
+    var em = walk('./');
+
+    em.on('fail',function(path,err){
+      fails.push(path); 
+    });
+
+    em.on('empty',function(path,err){
+      emptys.push(path); 
+    });
+
+    em.on('end',function(){
+      t.equals(fails.length,0,'should not have any fails');
+      t.equals(path.basename(emptys[0]),'empty','should find empty dir');
+      t.end();
+    });
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
new file mode 100644
index 0000000..e8d5fb1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
@@ -0,0 +1,36 @@
+var test = require('tap').test,
+walk  = require('../walkdir.js');
+
+test('should be able to pause walk',function(t){
+
+  var paths = [];
+  var paused = false;
+  var em = walk('./',function(path){
+    if(!paused){
+      em.pause();
+      paused = 1;
+      setTimeout(function(){
+        t.equals(paths.length,1,'while paused should not emit any more paths');
+        em.resume();
+      },300);
+    } else if(paused == 1){
+      em.pause();
+      paused = 2;
+      setTimeout(function(){
+        t.equals(paths.length,2,'while paused should not emit any more paths');
+        em.resume();
+      },300);
+    }
+
+    paths.push(path);
+
+  });
+
+  em.on('end',function(){
+    console.log('end, and i found ',paths.length,'paths');
+    t.ok(paths.length > 1,'should have more paths before end');
+    t.end();
+  });
+
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
new file mode 100644
index 0000000..2ccde9a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
@@ -0,0 +1,37 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+
+test('follow symlinks',function(t){
+
+  var links = [],paths = [],failures = [],errors = [];
+
+  var emitter = walkdir(__dirname+'/dir/symlinks/dir2',{follow_symlinks:true});
+
+  emitter.on('path',function(path,stat){
+    paths.push(path);
+  });
+
+  emitter.on('link',function(path,stat){
+    links.push(path);
+  });
+
+  emitter.on('error',function(path,err){
+    console.log('error!!', arguments);
+    errors.push(arguments);
+  });
+
+  emitter.on('fail',function(path,err){
+    failures.push(path);
+  });
+
+  emitter.on('end',function(){
+
+    t.equal(errors.length,0,'should have no errors');
+    t.equal(failures.length,1,'should have a failure');
+    t.ok(paths.indexOf(__dirname+'/dir/symlinks/dir1/file1') !== -1,'if follow symlinks works i would have found dir1 file1');
+    t.equal(require('path').basename(failures[0]),'does-not-exist','should have fail resolviong does-not-exist which dangling-symlink points to');
+    t.end();
+
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
new file mode 100644
index 0000000..1243ab5
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
@@ -0,0 +1,50 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir',
+'dir/foo/a/b/z':'file',
+'dir/foo/a/b/c':'dir',
+'dir/foo/a/b/c/w':'file'
+};
+
+test('sync',function(t){
+  var paths = [],
+  files = [],
+  dirs = [];
+
+  var pathResult = walkdir.sync(__dirname+'/dir/foo',function(path){
+    //console.log('path: ',path);
+    paths.push(path);
+  });
+
+  t.ok(pathResult instanceof Array,'if return object is not specified should be an array');
+
+  t.equals(Object.keys(expectedPaths).length,paths.length,'should have found the same number of paths as expected');
+
+  Object.keys(expectedPaths).forEach(function(v,k){
+      t.ok(paths.indexOf(__dirname+'/'+v) > -1,v+' should be found');
+  });
+
+  t.equivalent(paths,pathResult,'paths should be equal to pathResult');
+
+  t.end();
+});
+
+test('sync return object',function(t){
+
+  var pathResult = walkdir.sync(__dirname+'/dir/foo',{return_object:true});
+
+  t.ok(!(pathResult instanceof Array),'if return object is not specified should be an array');
+
+  t.equals(Object.keys(expectedPaths).length,Object.keys(pathResult).length,'should find the same number of paths as expected');
+
+  Object.keys(expectedPaths).forEach(function(v,k){
+      t.ok(pathResult[__dirname+'/'+v],'should  find path in result object');
+  });
+
+  t.end();
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
new file mode 100644
index 0000000..4484a22
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
@@ -0,0 +1,233 @@
+var EventEmitter = require('events').EventEmitter,
+fs = require('fs'),
+_path = require('path'),
+sep = _path.sep||'/';// 0.6.x
+
+
+module.exports = walkdir;
+
+walkdir.find = walkdir.walk = walkdir;
+
+walkdir.sync = function(path,options,cb){
+  if(typeof options == 'function') cb = options;
+  options = options || {};
+  options.sync = true;
+  return walkdir(path,options,cb);
+
+};
+
+function walkdir(path,options,cb){
+
+  if(typeof options == 'function') cb = options;
+
+  options = options || {};
+
+  var emitter = new EventEmitter(),
+  allPaths = (options.return_object?{}:[]),
+  resolved = false,
+  inos = {},
+  stop = 0,
+  pause = null,
+  ended = 0, 
+  jobs=0, 
+  job = function(value) {
+    jobs += value;
+    if(value < 1 && !tick) {
+      tick = 1;
+      process.nextTick(function(){
+        tick = 0;
+        if(jobs <= 0 && !ended) {
+          ended = 1;
+          emitter.emit('end');
+        }
+      });
+    }
+  }, tick = 0;
+
+  //mapping is stat functions to event names.	
+  var statIs = [['isFile','file'],['isDirectory','directory'],['isSymbolicLink','link'],['isSocket','socket'],['isFIFO','fifo'],['isBlockDevice','blockdevice'],['isCharacterDevice','characterdevice']];
+
+  var statter = function (path,first,depth) {
+    job(1);
+    var statAction = function fn(err,stat,data) {
+
+      job(-1);
+      if(stop) return;
+
+      // in sync mode i found that node will sometimes return a null stat and no error =(
+      // this is reproduceable in file descriptors that no longer exist from this process
+      // after a readdir on /proc/3321/task/3321/ for example. Where 3321 is this pid
+      // node @ v0.6.10 
+      if(err || !stat) { 
+        emitter.emit('fail',path,err);
+        return;
+      }
+
+
+      //if i have evented this inode already dont again.
+      if(inos[stat.dev+'-'+stat.ino] && stat.ino) return;
+      inos[stat.dev+'-'+stat.ino] = 1;
+
+      if (first && stat.isDirectory()) {
+        emitter.emit('targetdirectory',path,stat,depth);
+        return;
+      }
+
+      emitter.emit('path', path, stat,depth);
+
+      var i,name;
+
+      for(var j=0,k=statIs.length;j<k;j++) {
+        if(stat[statIs[j][0]]()) {
+          emitter.emit(statIs[j][1],path,stat,depth);
+          break;
+        }
+      }
+    };
+    
+    if(options.sync) {
+      var stat,ex;
+      try{
+        stat = fs.lstatSync(path);
+      } catch (e) {
+        ex = e;
+      }
+
+      statAction(ex,stat);
+    } else {
+        fs.lstat(path,statAction);
+    }
+  },readdir = function(path,stat,depth){
+    if(!resolved) {
+      path = _path.resolve(path);
+      resolved = 1;
+    }
+
+    if(options.max_depth && depth >= options.max_depth){
+      emitter.emit('maxdepth',path,stat,depth);
+      return;
+    }
+
+    job(1);
+    var readdirAction = function(err,files) {
+      job(-1);
+      if (err || !files) {
+        //permissions error or invalid files
+        emitter.emit('fail',path,err);
+        return;
+      }
+
+      if(!files.length) {
+        // empty directory event.
+        emitter.emit('empty',path,stat,depth);
+        return;     
+      }
+
+      if(path == sep) path='';
+      for(var i=0,j=files.length;i<j;i++){
+        statter(path+sep+files[i],false,(depth||0)+1);
+      }
+
+    };
+
+    //use same pattern for sync as async api
+    if(options.sync) {
+      var e,files;
+      try {
+          files = fs.readdirSync(path);
+      } catch (e) { }
+
+      readdirAction(e,files);
+    } else {
+      fs.readdir(path,readdirAction);
+    }
+  };
+
+  if (options.follow_symlinks) {
+    var linkAction = function(err,path,depth){
+      job(-1);
+      //TODO should fail event here on error?
+      statter(path,false,depth);
+    };
+
+    emitter.on('link',function(path,stat,depth){
+      job(1);
+      if(options.sync) {
+        var lpath,ex;
+        try {
+          lpath = fs.readlinkSync(path);
+        } catch(e) {
+          ex = e;
+        }
+        linkAction(ex,_path.resolve(_path.dirname(path),lpath),depth);
+
+      } else {
+        fs.readlink(path,function(err,lpath){
+          linkAction(err,_path.resolve(_path.dirname(path),lpath),depth);
+        });
+      }
+    });
+  }
+
+  if (cb) {
+    emitter.on('path',cb);
+  }
+
+  if (options.sync) {
+    if(!options.no_return){
+      emitter.on('path',function(path,stat){
+        if(options.return_object) allPaths[path] = stat;
+        else allPaths.push(path);
+      });
+    }
+  }
+
+  if (!options.no_recurse) {
+    emitter.on('directory',readdir);
+  }
+  //directory that was specified by argument.
+  emitter.once('targetdirectory',readdir);
+  //only a fail on the path specified by argument is fatal 
+  emitter.once('fail',function(_path,err){
+    //if the first dir fails its a real error
+    if(path == _path) {
+      emitter.emit('error',path,err);
+    }
+  });
+
+  statter(path,1);
+  if (options.sync) {
+    return allPaths;
+  } else {
+    //support stopping everything.
+    emitter.end = emitter.stop = function(){stop = 1;};
+    //support pausing everything
+    var emitQ = [];
+    emitter.pause = function(){
+      job(1);
+      pause = true;
+      emitter.emit = function(){
+        emitQ.push(arguments);
+      };
+    };
+    // support getting the show going again
+    emitter.resume = function(){
+      if(!pause) return;
+      pause = false;
+      // not pending
+      job(-1);
+      //replace emit
+      emitter.emit = EventEmitter.prototype.emit;
+      // local ref
+      var q = emitQ;
+      // clear ref to prevent infinite loops
+      emitQ = [];
+      while(q.length) {
+        emitter.emit.apply(emitter,q.shift());
+      }
+    };
+
+    return emitter;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/package.json b/blackberry10/node_modules/jasmine-node/package.json
new file mode 100755
index 0000000..4573a53
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/package.json
@@ -0,0 +1,56 @@
+{
+  "name": "jasmine-node",
+  "version": "1.7.1",
+  "description": "DOM-less simple JavaScript BDD testing framework for Node",
+  "contributors": [
+    {
+      "name": "Chris Moultrie",
+      "email": "chris@moultrie.org"
+    }
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/mhevery/jasmine-node.git"
+  },
+  "keywords": [
+    "testing",
+    "bdd"
+  ],
+  "author": {
+    "name": "Misko Hevery",
+    "email": "misko@hevery.com"
+  },
+  "maintainers": "Martin Häger <ma...@gmail.com>",
+  "licenses": [
+    "MIT"
+  ],
+  "dependencies": {
+    "coffee-script": ">=1.0.1",
+    "jasmine-reporters": ">=0.2.0",
+    "requirejs": ">=0.27.1",
+    "walkdir": ">= 0.0.1",
+    "underscore": ">= 1.3.1",
+    "gaze": "~0.3.2",
+    "mkdirp": "~0.3.5"
+  },
+  "bin": {
+    "jasmine-node": "bin/jasmine-node"
+  },
+  "preferGlobal": true,
+  "main": "lib/jasmine-node",
+  "scripts": {
+    "test": "node lib/jasmine-node/cli.js spec"
+  },
+  "devDependencies": {},
+  "readme": "jasmine-node\n======\n\n[![Build Status](https://secure.travis-ci.org/spaghetticode/jasmine-node.png)](http://travis-ci.org/spaghetticode/jasmine-node)\n\nThis node.js module makes the wonderful Pivotal Lab's jasmine\n(http://github.com/pivotal/jasmine) spec framework available in\nnode.js.\n\njasmine\n-------\n\nVersion 1.3.1 of Jasmine is currently included with node-jasmine.\n\nwhat's new\n----------\n*  Ability to test specs written in Literate Coffee-Script\n*  Teamcity Reporter reinstated.\n*  Ability to specify multiple files to test via list in command line\n*  Ability to suppress stack trace with <code>--noStack</code>\n*  Async tests now run in the expected context instead of the global one\n*  --config flag that allows you to assign variables to process.env\n*  Terminal Reporters are now available in the Jasmine Object #184\n*  Done is now available in all timeout specs #199\n*  <code>afterEach</code> is available in requirejs #179\n*  Editors that replace in
 stead of changing files should work with autotest #198\n*  Jasmine Mock Clock now works!\n*  Autotest now works!\n*  Using the latest Jasmine!\n*  Verbose mode tabs <code>describe</code> blocks much more accurately!\n*  --coffee now allows specs written in Literate CoffeeScript (.litcoffee)\n\ninstall\n------\n\nTo install the latest official version, use NPM:\n\n    npm install jasmine-node -g\n\nTo install the latest _bleeding edge_ version, clone this repository and check\nout the `beta` branch.\n\nusage\n------\n\nWrite the specifications for your code in \\*.js and \\*.coffee files in the\nspec/ directory (note: your specification files must end with either\n.spec.js, .spec.coffee or .spec.litcoffee; otherwise jasmine-node won't find them!). You can use sub-directories to better organise your specs.\n\nIf you have installed the npm package, you can run it with:\n\n    jasmine-node spec/\n\nIf you aren't using npm, you should add `pwd`/lib to the $NODE_PATH\nenvironment variable
 , then run:\n\n    node lib/jasmine-node/cli.js\n\n\nYou can supply the following arguments:\n\n  * <code>--autotest</code>, provides automatic execution of specs after each change\n  * <code>--coffee</code>, allow execution of .coffee and .litcoffee specs\n  * <code>--color</code>, indicates spec output should uses color to\nindicates passing (green) or failing (red) specs\n  * <code>--noColor</code>, do not use color in the output\n  * <code>-m, --match REGEXP</code>, match only specs comtaining \"REGEXPspec\"\n  * <code>--matchall</code>, relax requirement of \"spec\" in spec file names\n  * <code>--verbose</code>, verbose output as the specs are run\n  * <code>--junitreport</code>, export tests results as junitreport xml format\n  * <code>--output FOLDER</code>, defines the output folder for junitreport files\n  * <code>--teamcity</code>, converts all console output to teamcity custom test runner commands. (Normally auto detected.)\n  * <code>--runWithRequireJs</code>, loads all
  specs using requirejs instead of node's native require method\n  * <code>--requireJsSetup</code>, file run before specs to include and configure RequireJS\n  * <code>--test-dir</code>, the absolute root directory path where tests are located\n  * <code>--nohelpers</code>, does not load helpers\n  * <code>--forceexit</code>, force exit once tests complete\n  * <code>--captureExceptions</code>, listen to global exceptions, report them and exit (interferes with Domains in NodeJs, so do not use if using Domains as well\n  * <code>--config NAME VALUE</code>, set a global variable in process.env\n  * <code>--noStack</code>, suppress the stack trace generated from a test failure\n\nIndividual files to test can be added as bare arguments to the end of the args.\n\nExample:\n\n`jasmine-node --coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpecs.js`\n\nasync tests\n-----------\n\njasmine-node includes an alternate syntax for writing asynchronous tests. Accepting\na done callb
 ack in the specification will trigger jasmine-node to run the test\nasynchronously waiting until the done() callback is called.\n\n```javascript\n    it(\"should respond with hello world\", function(done) {\n      request(\"http://localhost:3000/hello\", function(error, response, body){\n        expect(body).toEqual(\"hello world\");\n        done();\n      });\n    });\n```\n\nAn asynchronous test will fail after 5000 ms if done() is not called. This timeout\ncan be changed by setting jasmine.DEFAULT_TIMEOUT_INTERVAL or by passing a timeout\ninterval in the specification.\n\n    it(\"should respond with hello world\", function(done) {\n      request(\"http://localhost:3000/hello\", function(error, response, body){\n        done();\n      }, 250);  // timeout after 250 ms\n    });\n\nCheckout spec/SampleSpecs.js to see how to use it.\n\nrequirejs\n---------\n\nThere is a sample project in `/spec-requirejs`. It is comprised of:\n\n1.  `requirejs-setup.js`, this pulls in our wrapper t
 emplate (next)\n1.  `requirejs-wrapper-template`, this builds up requirejs settings\n1.  `requirejs.sut.js`, this is a __SU__bject To __T__est, something required by requirejs\n1.  `requirejs.spec.js`, the actual jasmine spec for testing\n\ndevelopment\n-----------\n\nInstall the dependent packages by running:\n\n    npm install\n\nRun the specs before you send your pull request:\n\n    specs.sh\n\n__Note:__ Some tests are designed to fail in the specs.sh. After each of the\nindividual runs completes, there is a line that lists what the expected\nPass/Assert/Fail count should be. If you add/remove/edit tests, please be sure\nto update this with your PR.\n\n\nchangelog\n---------\n\n*  _1.7.1 - Removed unneeded fs dependency (thanks to\n   [kevinsawicki](https://github.com/kevinsawicki)) Fixed broken fs call in\n   node 0.6 (thanks to [abe33](https://github.com/abe33))_\n*  _1.7.0 - Literate Coffee-Script now testable (thanks to [magicmoose](https://github.com/magicmoose))_\n*  _1.6.
 0 - Teamcity Reporter Reinstated (thanks to [bhcleek](https://github.com/bhcleek))_\n*  _1.5.1 - Missing files and require exceptions will now report instead of failing silently_\n*  _1.5.0 - Now takes multiple files for execution. (thanks to [abe33](https://github.com/abe33))_\n*  _1.4.0 - Optional flag to suppress stack trace on test failure (thanks to [Lastalas](https://github.com/Lastalas))_\n*  _1.3.1 - Fixed context for async tests (thanks to [omryn](https://github.com/omryn))_\n*  _1.3.0 - Added --config flag for changeable testing environments_\n*  _1.2.3 - Fixed #179, #184, #198, #199. Fixes autotest, afterEach in requirejs, terminal reporter is in jasmine object, done function missing in async tests_\n*  _1.2.2 - Revert Exception Capturing to avoid Breaking Domain Tests_\n*  _1.2.1 - Emergency fix for path reference missing_\n*  _1.2.0 - Fixed #149, #152, #171, #181, #195. --autotest now works as expected, jasmine clock now responds to the fake ticking as requested, and re
 moved the path.exists warning_\n*  _1.1.1 - Fixed #173, #169 (Blocks were not indented in verbose properly, added more documentation to address #180_\n*  _1.1.0 - Updated Jasmine to 1.3.1, fixed fs missing, catching uncaught exceptions, other fixes_\n",
+  "readmeFilename": "README.md",
+  "bugs": {
+    "url": "https://github.com/mhevery/jasmine-node/issues"
+  },
+  "_id": "jasmine-node@1.7.1",
+  "dist": {
+    "shasum": "5df8182da5f9a4612d07089417248d4bc2a01a92"
+  },
+  "_from": "jasmine-node@1.7.1",
+  "_resolved": "https://registry.npmjs.org/jasmine-node/-/jasmine-node-1.7.1.tgz"
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/scripts/specs
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/scripts/specs b/blackberry10/node_modules/jasmine-node/scripts/specs
new file mode 100755
index 0000000..28a45f0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/scripts/specs
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+entry="node lib/jasmine-node/cli.js "
+
+if [ $# -ne 0 ]; then
+  command=$entry"$1 spec"
+  echo $command
+  $command
+else
+  echo "Running all tests located in the spec directory"
+  command=$entry"spec"
+  echo $command
+  time $command #/nested/uber-nested
+  echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+  echo ""
+
+  echo "Running all tests located in the spec directory with coffee option"
+  command=$entry"--coffee spec"
+  echo $command
+  time $command #/nested/uber-nested
+  echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+  echo ""
+
+  echo "Running all tests located in the spec directory with requirejs option"
+  #command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+  command=$entry"--runWithRequireJs spec"
+  echo $command
+  time $command
+  echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+
+  echo "Running all tests located in the spec-requirejs directory with requirejs"
+  #command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+  command=$entry"--runWithRequireJs spec-requirejs"
+  echo $command
+  time $command
+  echo -e "\033[1;35m--- Should have 1 test and 2 assertions and 0 Failures. ---\033[0m"
+fi

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
new file mode 100644
index 0000000..4a8f754
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
@@ -0,0 +1,5 @@
+require [ "cs!requirecs.sut" ], (sut) ->
+  describe "RequireJs basic tests with spec and sut in CoffeeScript", ->
+    it "should load coffeescript sut", ->
+      expect(sut.name).toBe "CoffeeScript To Test"
+      expect(sut.method(2)).toBe 4

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
new file mode 100644
index 0000000..05bad4a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
@@ -0,0 +1,5 @@
+require [ "requirecs.sut" ], (sut) ->
+  describe "RequireJs basic tests with spec in CoffeeScript", ->
+    it "should load javascript sut", ->
+      expect(sut.name).toBe "CoffeeScript To Test"
+      expect(sut.method(2)).toBe 4

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
new file mode 100644
index 0000000..b0a2250
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
@@ -0,0 +1,3 @@
+define ->
+    name: 'CoffeeScript To Test'
+    method: (input) -> 2 * input

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
new file mode 100644
index 0000000..0cd82b8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
@@ -0,0 +1,13 @@
+/** Custom RequireJS setup file to test user-specified setup files */
+
+/* We want to minimize behavior changes between this test setup file and the
+ * default setup file to avoid breaking tests which rely on any (current or
+ * future) default behavior.  So we:
+ * - Run the normal setup file
+ * - Avoid introducing additional global variables
+ * - Avoid maintaining two copies of the setup file
+ */
+eval(require('fs').readFileSync(baseUrl + '../lib/jasmine-node/requirejs-wrapper-template.js', 'utf8'));
+
+// This is our indicator that this custom setup script has run
+var setupHasRun = true;

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
new file mode 100644
index 0000000..5e7bddb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
@@ -0,0 +1,19 @@
+require(['requirejs.sut'], function(sut){
+  describe('RequireJs basic tests', function(){
+    beforeEach(function(){
+        expect(true).toBeTruthy();
+    });
+    afterEach(function(){
+        expect(true).toBeTruthy();
+    });
+    
+    it('should load sut', function(){
+      expect(sut.name).toBe('Subject To Test');
+      expect(sut.method(2)).toBe(3);
+    });
+
+    it('should run setup', function(){
+      expect(typeof setupHasRun).toBe('boolean');
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
new file mode 100644
index 0000000..1d5095f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
@@ -0,0 +1,8 @@
+define(function(){
+  return {
+    name: 'Subject To Test',
+    method: function(input){
+      return 1+input;
+    }
+  };
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
new file mode 100644
index 0000000..a6e160d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
@@ -0,0 +1,11 @@
+#=============================================================================
+# Async spec, that will be time outed
+#=============================================================================
+describe 'async', ->
+  it 'should be timed out', ->
+    waitsFor (-> false), 'MIRACLE', 500
+
+  doneFunc = (done) ->
+    setTimeout(done, 10000)
+
+  it "should timeout after 100 ms", doneFunc, 100

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
new file mode 100755
index 0000000..757da61
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
@@ -0,0 +1,4 @@
+describe 'jasmine-node', ->
+
+  it 'should pass', ->
+    expect(1+2).toEqual(3)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee b/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
new file mode 100644
index 0000000..507fd58
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
@@ -0,0 +1,22 @@
+global.testClass = (description, specDefinitions) ->
+    suite = jasmine.getEnv().describe('Class: ' + description, specDefinitions)
+    suite.tags = ['class']
+    suite.isIntermediate = true;
+    suite
+
+global.feature = (description, specDefinitions) ->
+    suite = jasmine.getEnv().describe('Feature: ' + description, specDefinitions)
+    suite.tags = ['feature']
+    suite.isIntermediate = true;
+    suite
+
+global.scenario = (desc, func) ->
+    suite = jasmine.getEnv().describe('Scenario: ' + desc, func)
+    suite.tags = ['scenario']
+    suite.isIntermediate = true;
+    suite
+
+global.should = (description, specDefinitions) ->
+    suite = jasmine.getEnv().it('It should ' + description, specDefinitions)
+    suite.tags = ['should']
+    suite

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
new file mode 100644
index 0000000..16498c0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
@@ -0,0 +1,6 @@
+
+testClass 'HelperLoader', ->
+    feature 'Loading order', ->
+        should 'load the helpers before the specs.', ->
+            expect(true).toBeTruthy()
+            # will fail to parse the spec if the helper was not loaded first

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js b/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
new file mode 100755
index 0000000..f9c001b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
@@ -0,0 +1,25 @@
+describe('jasmine-node', function(){
+
+  it('should pass', function(){
+    expect(1+2).toEqual(3);
+  });
+
+  it('shows asynchronous test', function(){
+    setTimeout(function(){
+      expect('second').toEqual('second');
+      asyncSpecDone();
+    }, 1);
+    expect('first').toEqual('first');
+    asyncSpecWait();
+  });
+
+  it('shows asynchronous test node-style', function(done){
+    setTimeout(function(){
+      expect('second').toEqual('second');
+      // If you call done() with an argument, it will fail the spec 
+      // so you can use it as a handler for many async node calls
+      done();
+    }, 1);
+    expect('first').toEqual('first');
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/TestSpec.js b/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
new file mode 100755
index 0000000..89bb204
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
@@ -0,0 +1,82 @@
+
+describe('jasmine-node-flat', function(){
+  it('should pass', function(){
+    expect(1+2).toEqual(3);
+  });
+});
+
+describe('Testing some characters', function()  {
+    var chars = ['&', '\'', '"', '<', '>'];
+    for(var i = 0; i < chars.length; i+=1)  {
+        currentChar = chars[i];
+        it('should reject ' + currentChar, (function(currentChar)  {
+            expect(false).toEqual(false);
+        })(currentChar));
+    }
+});
+
+describe('Testing waitsfor functionality', function() {
+    it("Runs and then waitsFor", function() {
+        runs(function() {
+            1+1;
+        });
+        waitsFor(function() {
+            return true === false;
+        }, "the impossible", 1000);
+        runs(function() {
+            expect(true).toBeTruthy();
+        });
+    });
+});
+
+describe('root', function () {
+
+  describe('nested', function () {
+
+    xit('nested statement', function () {
+      expect(1).toBeTruthy();
+    });
+
+  });
+
+  it('root statement', function () {
+    expect(1).toBeTruthy();
+  });
+
+});
+
+describe("Top level describe block", function() {
+  it("first it block in top level describe", function() {
+    expect(true).toEqual(true);
+  });
+  describe("Second level describe block", function() {
+    it("first it block in second level describe", function() {
+      expect(true).toBe(true);
+    });
+  });
+  it("second it block in top level describe", function() {
+    expect(true).toEqual(true);
+  });
+});
+
+describe('async', function () {
+
+    var request = function (str, func) {
+        func('1', '2', 'hello world');
+    };
+
+    it("should respond with hello world", function(done) {
+        request("http://localhost:3000/hello", function(error, response, body){
+            expect(body).toEqual("hello world");
+            done();
+        });
+    });
+
+    it("should respond with hello world", function(done) {
+        request("http://localhost:3000/hello", function(error, response, body){
+            expect(body).toEqual("hello world");
+            done();
+        });
+    }, 250); // timeout after 250 ms
+
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js b/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
new file mode 100644
index 0000000..00d584c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
@@ -0,0 +1,34 @@
+describe("Manually ticking the Jasmine Mock Clock", function() {
+  var timerCallback;
+
+  beforeEach(function() {
+    timerCallback = jasmine.createSpy('timerCallback');
+    jasmine.Clock.useMock();
+  });
+
+  it("causes a timeout to be called synchronously", function() {
+    setTimeout(timerCallback, 100);
+
+    expect(timerCallback).not.toHaveBeenCalled();
+
+    jasmine.Clock.tick(101);
+
+    expect(timerCallback).toHaveBeenCalled();
+  });
+
+  it("causes an interval to be called synchronously", function() {
+    setInterval(timerCallback, 100);
+
+    expect(timerCallback).not.toHaveBeenCalled();
+
+    jasmine.Clock.tick(102);
+    expect(timerCallback).toHaveBeenCalled();
+    expect(timerCallback.callCount).toEqual(1);
+
+    jasmine.Clock.tick(50);
+    expect(timerCallback.callCount).toEqual(1);
+
+    jasmine.Clock.tick(50);
+    expect(timerCallback.callCount).toEqual(2);
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js b/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
new file mode 100644
index 0000000..79bd754
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
@@ -0,0 +1,174 @@
+describe('async-callback', function() {
+  var env;
+  beforeEach(function() {
+    env = new jasmine.Env();
+  });
+
+  describe('it', function() {
+
+    it("should time out if callback is not called", function() {
+      env.describe("it", function() {
+        env.it("doesn't wait", function(done) {
+          expect(1+2).toEqual(3);
+        });
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return env.currentRunner().results().totalCount > 0;
+      }, 6000);
+
+      runs(function() {
+        expect(env.currentRunner().results().failedCount).toEqual(1);
+        expect(firstResult(env.currentRunner()).message).toMatch(/timeout/);;
+      });
+    });
+
+    it("should accept timeout for individual spec", function() {
+      env.describe("it", function() {
+        env.it("doesn't wait", function(done) {
+          expect(1+2).toEqual(3);
+        }, 250);
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return env.currentRunner().results().totalCount > 0;
+      }, 500);
+
+      runs(function() {
+        expect(env.currentRunner().results().failedCount).toEqual(1);
+        expect(firstResult(env.currentRunner()).message).toMatch(/timeout/);;
+      });
+    });
+
+    it("should fail if callback is passed error", function() {
+       env.describe("it", function() {
+        env.it("doesn't wait", function(done) {
+          process.nextTick(function() {
+            done("Failed asynchronously");
+          });
+        });
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return env.currentRunner().results().totalCount > 0;
+      });
+
+      runs(function() {
+        expect(env.currentRunner().results().failedCount).toEqual(1);
+        expect(firstResult(env.currentRunner()).message).toEqual("Failed asynchronously");
+      });
+    });
+
+
+    it("should finish after callback is called", function() {
+      env.describe("it", function() {
+        env.it("waits", function(done) {
+          process.nextTick(function() {
+            env.currentSpec.expect(1+2).toEqual(3);
+            done();
+          });
+        });
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return env.currentRunner().results().totalCount > 0;
+      }, 2000);
+
+      runs(function() {
+        expect(env.currentRunner().results().passedCount).toEqual(1);
+      });
+    });
+
+      it('should run in the context of the current spec', function(){
+          var actualContext;
+          var jasmineSpecContext;
+          env.describe("it", function() {
+              env.it("register context", function(done) {
+                  actualContext = this;
+                  jasmineSpecContext = env.currentSpec;
+                  env.expect(this).toBe(jasmineSpecContext);
+                  done();
+              });
+          });
+
+          env.currentRunner().execute();
+
+          waitsFor(function() {
+              return env.currentRunner().results().totalCount > 0;
+          }, 'tested jasmine env runner to run the test', 100);
+
+          runs(function() {
+              expect(actualContext).not.toBe(global);
+              expect(actualContext).toBe(jasmineSpecContext);
+          });
+      });
+
+  });
+
+  describe("beforeEach", function() {
+    it("should wait for callback", function() {
+      env.describe("beforeEach", function() {
+        var waited = false;
+        env.beforeEach(function(done) {
+          process.nextTick(function() {
+            waited = true;
+            done();
+          });
+        });
+        env.it("waited", function() {
+          env.currentSpec.expect(waited).toBeTruthy();
+        });
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return env.currentRunner().results().totalCount > 0;
+      });
+
+      runs(function() {
+        expect(env.currentRunner().results().passedCount).toEqual(1);
+      });
+      });
+  });
+
+  describe("afterEach", function() {
+    it("should be passed async callback", function() {
+      var completed = false;
+      env.describe("afterEach", function() {
+        env.afterEach(function(done) {
+          process.nextTick(function() {
+            done('Failed in afterEach');
+            completed = true;
+          });
+        });
+        env.it("should pass", function() {
+          this.expect(1+2).toEqual(3);
+        });
+      });
+
+      env.currentRunner().execute();
+
+      waitsFor(function() {
+        return completed === true;
+      });
+
+      runs(function() {
+        expect(env.currentRunner().results().passedCount).toEqual(1);
+        expect(env.currentRunner().results().failedCount).toEqual(1);
+      });
+    });
+  });
+});
+
+function firstResult(runner) {
+  return runner.results().getItems()[0].getItems()[0].getItems()[0];
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/helper_spec.js b/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
new file mode 100644
index 0000000..d157fd2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
@@ -0,0 +1,7 @@
+describe("helper", function() {
+  it("should load the helpers", function() {
+    var expectation= expect(true);
+    
+    expect(typeof(expectation.toHaveProperty)).toBe('function');
+  });
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee b/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
new file mode 100644
index 0000000..77eb791
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
@@ -0,0 +1,9 @@
+Literate CoffeeScript
+====================
+
+This is a spec using written in Literate CoffeeScript
+
+    describe 'Coffee.litcoffee', ->
+
+        it 'should pass', ->
+            expect(1+2).toEqual(3)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
new file mode 100644
index 0000000..e63ee64
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
@@ -0,0 +1,5 @@
+describe('jasmine-node-nested.js', function(){
+  it('should pass', function(){
+    expect(1+2).toEqual(3);
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
new file mode 100755
index 0000000..6d27d30
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
@@ -0,0 +1,5 @@
+describe('jasmine-node-nested', function(){
+  it('should pass', function(){
+    expect(1+2).toEqual(3);
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
new file mode 100755
index 0000000..146203b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
@@ -0,0 +1,11 @@
+describe('jasmine-node-uber-nested', function(){
+  it('should pass', function(){
+    expect(1+2).toEqual(3);
+  });
+
+  describe('failure', function(){
+    it('should report failure (THIS IS EXPECTED)', function(){
+      expect(true).toBeFalsy();
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js b/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
new file mode 100644
index 0000000..b89df45
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
@@ -0,0 +1,476 @@
+var jasmineNode = require(__dirname + "/../lib/jasmine-node/reporter").jasmineNode;
+
+describe('TerminalReporter', function() {
+  beforeEach(function() {
+    var config = {}
+    this.reporter = new jasmineNode.TerminalReporter(config);
+  });
+
+  describe("initialize", function() {
+    it('initializes print_ from config', function() {
+      var config = { print: true };
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.print_).toBeTruthy();
+    });
+
+    it('initializes color_ from config', function() {
+      var config = { color: true }
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.color_).toEqual(jasmineNode.TerminalReporter.prototype.ANSIColors);
+    });
+
+    it('initializes includeStackTrace_ from config', function () {
+        var config = {}
+        this.reporter = new jasmineNode.TerminalReporter(config);
+        expect(this.reporter.includeStackTrace_).toBeTruthy();
+    });
+
+    it('sets the started_ flag to false', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.started_).toBeFalsy();
+    });
+
+    it('sets the finished_ flag to false', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.finished_).toBeFalsy();
+    });
+
+    it('initializes the suites_ array', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.suites_.length).toEqual(0);
+    });
+
+    it('initializes the specResults_ to an Object', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.specResults_).toBeDefined();
+    });
+
+    it('initializes the failures_ array', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.failures_.length).toEqual(0);
+    });
+
+    it('sets the callback_ property to false by default', function() {
+      var config = {}
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.callback_).toEqual(false)
+    });
+
+    it('sets the callback_ property to onComplete if supplied', function() {
+      var foo = function() { }
+      var config = { onComplete: foo }
+      this.reporter = new jasmineNode.TerminalReporter(config);
+      expect(this.reporter.callback_).toBe(foo)
+    });
+  });
+
+  describe('when the report runner starts', function() {
+    beforeEach(function() {
+      this.spy = spyOn(this.reporter, 'printLine_');
+
+      var runner = {
+        topLevelSuites: function() {
+          var suites = [];
+          var suite = { id: 25 };
+          suites.push(suite);
+          return suites;
+        }
+      };
+      this.reporter.reportRunnerStarting(runner);
+    });
+
+    it('sets the started_ field to true', function() {
+      expect(this.reporter.started_).toBeTruthy();
+    });
+
+    it('sets the startedAt field', function() {
+      // instanceof does not work cross-context (such as when run with requirejs)
+      var ts = Object.prototype.toString;
+      expect(ts.call(this.reporter.startedAt)).toBe(ts.call(new Date()));
+    });
+
+    it('buildes the suites_ collection', function() {
+      expect(this.reporter.suites_.length).toEqual(1);
+      expect(this.reporter.suites_[0].id).toEqual(25);
+    });
+  });
+
+  describe('the summarize_ creates suite and spec tree', function() {
+    beforeEach(function() {
+      this.spec = {
+        id: 1,
+        description: 'the spec',
+        isSuite: false
+      }
+    });
+
+    it('creates a summary object from spec', function() {
+      var result = this.reporter.summarize_(this.spec);
+
+      expect(result.id).toEqual(1);
+      expect(result.name).toEqual('the spec');
+      expect(result.type).toEqual('spec');
+      expect(result.children.length).toEqual(0);
+    });
+
+    it('creates a summary object from suite with 1 spec', function() {
+      var env = { nextSuiteId: false }
+      var suite = new jasmine.Suite(env, 'suite name', undefined, undefined);
+      suite.description = 'the suite';
+      suite.parentSuite = null;
+      suite.children_.push(this.spec);
+
+      var result = this.reporter.summarize_(suite);
+      expect(result.name).toEqual('the suite');
+      expect(result.type).toEqual('suite');
+      expect(result.children.length).toEqual(1);
+
+      var suiteChildSpec = result.children[0];
+      expect(suiteChildSpec.id).toEqual(1);
+    });
+  });
+
+  describe('reportRunnerResults', function() {
+    beforeEach(function() {
+      this.printLineSpy = spyOn(this.reporter, 'printLine_');
+    });
+
+    it('generates the report', function() {
+      var failuresSpy = spyOn(this.reporter, 'reportFailures_');
+      var printRunnerResultsSpy = spyOn(this.reporter, 'printRunnerResults_').
+                          andReturn('this is the runner result');
+
+      var callbackSpy = spyOn(this.reporter, 'callback_');
+
+      var runner = {
+        results: function() {
+          var result = { failedCount: 0 };
+          return result;
+        },
+        specs: function() { return []; }
+      };
+      this.reporter.startedAt = new Date();
+
+      this.reporter.reportRunnerResults(runner);
+
+      expect(failuresSpy).toHaveBeenCalled();
+      expect(this.printLineSpy).toHaveBeenCalled();
+      expect(callbackSpy).toHaveBeenCalled();
+    });
+  });
+
+  describe('reportSpecResults', function() {
+    beforeEach(function() {
+      this.printSpy = spyOn(this.reporter, 'print_');
+      this.spec = {
+        id: 1,
+        description: 'the spec',
+        isSuite: false,
+        results: function() {
+          var result = {
+            passed: function() { return true; }
+          }
+          return result;
+        }
+      }
+    });
+
+    it('prints a \'.\' for pass', function() {
+      this.reporter.reportSpecResults(this.spec);
+      expect(this.printSpy).toHaveBeenCalledWith('.');
+    });
+
+    it('prints an \'F\' for failure', function() {
+      var addFailureToFailuresSpy = spyOn(this.reporter, 'addFailureToFailures_');
+      var results = function() {
+        var result = {
+          passed: function() { return false; }
+        }
+        return result;
+      }
+      this.spec.results = results;
+
+      this.reporter.reportSpecResults(this.spec);
+
+      expect(this.printSpy).toHaveBeenCalledWith('F');
+      expect(addFailureToFailuresSpy).toHaveBeenCalled();
+    });
+  });
+
+  describe('addFailureToFailures', function() {
+    it('adds message and stackTrace to failures_', function() {
+      var spec = {
+        suite: {
+          getFullName: function() { return 'Suite name' }
+        },
+        description: 'the spec',
+        results: function() {
+          var result = {
+            items_: function() {
+              var theItems = new Array();
+              var item = {
+                passed_: false,
+                message: 'the message',
+                trace: {
+                  stack: 'the stack'
+                }
+              }
+              theItems.push(item);
+              return theItems;
+            }.call()
+          };
+          return result;
+        }
+      };
+
+      this.reporter.addFailureToFailures_(spec);
+
+      var failures = this.reporter.failures_;
+      expect(failures.length).toEqual(1);
+      var failure = failures[0];
+      expect(failure.spec).toEqual('Suite name the spec');
+      expect(failure.message).toEqual('the message');
+      expect(failure.stackTrace).toEqual('the stack');
+    });
+  });
+
+  describe('prints the runner results', function() {
+    beforeEach(function() {
+      this.runner = {
+        results: function() {
+          var _results = {
+            totalCount: 23,
+            failedCount: 52
+          };
+          return _results;
+        },
+        specs: function() {
+          var _specs = new Array();
+          _specs.push(1);
+          return _specs;
+        }
+      };
+    });
+
+    it('uses the specs\'s length, totalCount and failedCount', function() {
+      var message = this.reporter.printRunnerResults_(this.runner);
+      expect(message).toEqual('1 test, 23 assertions, 52 failures\n');
+    });
+  });
+
+  describe('reports failures', function() {
+    beforeEach(function() {
+      this.printSpy = spyOn(this.reporter, 'print_');
+      this.printLineSpy = spyOn(this.reporter, 'printLine_');
+    });
+
+    it('does not report anything when there are no failures', function() {
+      this.reporter.failures_ = new Array();
+
+      this.reporter.reportFailures_();
+
+      expect(this.printLineSpy).not.toHaveBeenCalled();
+    });
+
+    it('prints the failures', function() {
+      var failure = {
+        spec: 'the spec',
+        message: 'the message',
+        stackTrace: 'the stackTrace'
+      }
+
+      this.reporter.failures_ = new Array();
+      this.reporter.failures_.push(failure);
+
+      this.reporter.reportFailures_();
+
+      var generatedOutput =
+                 [ [ '\n' ],
+                 [ '\n' ],
+                 [ '  1) the spec' ],
+                 [ '   Message:' ],
+                 [ '     the message' ],
+                 [ '   Stacktrace:' ] ];
+
+      expect(this.printLineSpy).toHaveBeenCalled();
+      expect(this.printLineSpy.argsForCall).toEqual(generatedOutput);
+
+      expect(this.printSpy).toHaveBeenCalled();
+      expect(this.printSpy.argsForCall[0]).toEqual(['Failures:']);
+      expect(this.printSpy.argsForCall[1]).toEqual(['     the stackTrace']);
+    });
+
+    it('prints the failures without a Stacktrace', function () {
+        var config = { includeStackTrace: false };
+        this.reporter = new jasmineNode.TerminalReporter(config);
+        this.printSpy = spyOn(this.reporter, 'print_');
+        this.printLineSpy = spyOn(this.reporter, 'printLine_');
+
+        var failure = {
+            spec: 'the spec',
+            message: 'the message',
+            stackTrace: 'the stackTrace'
+        }
+
+        this.reporter.failures_ = new Array();
+        this.reporter.failures_.push(failure);
+
+        this.reporter.reportFailures_();
+
+        var generatedOutput =
+                 [ [ '\n' ],
+                 [ '\n' ],
+                 [ '  1) the spec' ],
+                 [ '   Message:' ],
+                 [ '     the message' ] ];
+
+        expect(this.printLineSpy).toHaveBeenCalled();
+        expect(this.printLineSpy.argsForCall).toEqual(generatedOutput);
+
+        expect(this.printSpy).toHaveBeenCalled();
+        expect(this.printSpy.argsForCall[0]).toEqual(['Failures:']);
+        expect(this.printSpy.argsForCall[1]).toBeUndefined();
+    });
+  });
+});
+
+describe('TerminalVerboseReporter', function() {
+  beforeEach(function() {
+    var config = {}
+    this.verboseReporter = new jasmineNode.TerminalVerboseReporter(config);
+    this.addFailureToFailuresSpy = spyOn(this.verboseReporter, 'addFailureToFailures_');
+    this.spec = {
+      id: 23,
+      results: function() {
+        return {
+          failedCount: 1,
+          getItems: function() {
+            return ["this is the message"];
+          }
+        }
+      }
+    };
+  });
+
+  describe('#reportSpecResults', function() {
+    it('adds the spec to the failures_', function() {
+      this.verboseReporter.reportSpecResults(this.spec);
+
+      expect(this.addFailureToFailuresSpy).toHaveBeenCalledWith(this.spec);
+    });
+
+    it('adds a new object to the specResults_', function() {
+      this.verboseReporter.reportSpecResults(this.spec);
+
+      expect(this.verboseReporter.specResults_[23].messages).toEqual(['this is the message']);
+      expect(this.verboseReporter.specResults_[23].result).toEqual('failed');
+    });
+  });
+
+  describe('#buildMessagesFromResults_', function() {
+    beforeEach(function() {
+      this.suite = {
+        type: 'suite',
+        name: 'a describe block',
+        suiteNestingLevel: 0,
+        children: [],
+        getFullName: function() { return "A spec"; },
+      };
+
+      this.spec = {
+        id: 23,
+        type: 'spec',
+        name: 'a spec block',
+        children: []
+      };
+
+      this.verboseReporter.specResults_['23'] = {
+        result: 'passed'
+      };
+
+    });
+
+    it('does not build anything when the results collection is empty', function() {
+      var results = [],
+          messages = [];
+
+      this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+      expect(messages.length).toEqual(0);
+    });
+
+    it('adds a single suite to the messages', function() {
+      var results = [],
+          messages = [];
+
+      results.push(this.suite);
+
+      this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+      expect(messages.length).toEqual(2);
+      expect(messages[0]).toEqual('');
+      expect(messages[1]).toEqual('a describe block');
+    });
+
+    it('adds a single spec with success to the messages', function() {
+      var results = [],
+          messages = [];
+
+      this.passSpy = spyOn(this.verboseReporter.color_, 'pass');
+
+      results.push(this.spec);
+
+      this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+      expect(this.passSpy).toHaveBeenCalled();
+      expect(messages.length).toEqual(1);
+      expect(messages[0]).toEqual('a spec block');
+    });
+
+    it('adds a single spec with failure to the messages', function() {
+      var results = [],
+          messages = [];
+
+      this.verboseReporter.specResults_['23'].result = 'failed';
+
+      this.passSpy = spyOn(this.verboseReporter.color_, 'pass');
+      this.failSpy = spyOn(this.verboseReporter.color_, 'fail');
+
+      results.push(this.spec);
+
+      this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+      expect(this.failSpy).toHaveBeenCalled();
+      expect(this.passSpy).not.toHaveBeenCalled();
+    });
+
+    it('adds a suite, a suite and a single spec with success to the messages', function() {
+      var results = [],
+          messages = [];
+
+      var subSuite = new Object();
+      subSuite.type = 'suite';
+      subSuite.name = 'a sub describe block';
+      subSuite.suiteNestingLevel = 1;
+      subSuite.children = [];
+      subSuite.children.push(this.spec);
+
+      this.suite.children.push(subSuite);
+      results.push(this.suite);
+
+      this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+      expect(messages.length).toEqual(5);
+      expect(messages[0]).toEqual('');
+      expect(messages[1]).toEqual('a describe block');
+      expect(messages[2]).toEqual('');
+      expect(messages[3]).toEqual('    a sub describe block');
+      expect(messages[4]).toEqual('        a spec block');
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/sample_helper.js b/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
new file mode 100644
index 0000000..9f8032f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
@@ -0,0 +1,15 @@
+(function(){
+
+  var objectToString = Object.prototype.toString;
+  var PRIMITIVE_TYPES = [String, Number, RegExp, Boolean, Date];
+
+  jasmine.Matchers.prototype.toHaveProperty = function(prop) {
+      try {
+        return prop in this.actual;
+      }
+      catch (e) {
+        return false;
+      }
+  }
+
+})();

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/specs.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/specs.sh b/blackberry10/node_modules/jasmine-node/specs.sh
new file mode 100755
index 0000000..e61c11e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/specs.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+entry="node lib/jasmine-node/cli.js "
+
+echo "Running all tests located in the spec directory"
+command=$entry"spec"
+echo $command
+time $command #/nested/uber-nested
+echo -e "\033[1;35m--- Should have 57 tests and 101 assertions and 2 Failure. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec directory with coffee option"
+command=$entry"--coffee spec"
+echo $command
+time $command #/nested/uber-nested
+echo -e "\033[1;35m--- Should have 62 tests and 106 assertions and 4 Failures. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec directory with requirejs option"
+#command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+command=$entry"--runWithRequireJs spec"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 57 tests and 101 assertions and 2 Failure. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec-requirejs directory with requirejs, requirejs setup, and coffee option"
+command=$entry"--runWithRequireJs --requireJsSetup spec-requirejs-coffee/requirejs-setup.js --coffee spec-requirejs-coffee"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 2 tests and 4 assertions and 0 Failure. ---\033[0m"
+
+echo "Running three specs file in the spec directory with coffee option"
+command=$entry"--coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpecs.js"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 3 tests and 3 assertions and 2 Failure. ---\033[0m"