You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/08/01 22:22:31 UTC
[12/61] [abbrv] [partial] cordova-create git commit: gitignore node
modules
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js b/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
deleted file mode 100644
index cf57b07..0000000
--- a/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
+++ /dev/null
@@ -1,86 +0,0 @@
-exports.executeJsRunner = function(specCollection, done, jasmineEnv, setupFile) {
- var specs,
- specLoader = require('./requirejs-spec-loader'),
- requirejs = require('requirejs'),
- vm = require('vm'),
- fs = require('fs'),
- coffeescript = require('coffee-script'),
- template = fs.readFileSync(
- setupFile || (__dirname + '/requirejs-wrapper-template.js'),
- 'utf8'
- ),
- ensureUnixPath = function(path){
- return path.replace(/^(.):/, '/$1').replace(/\\/g, '/');
- },
- buildNewContext = function(spec){
- var context = {
- describe: describe,
- it: it,
- xdescribe: xdescribe,
- xit: xit,
- beforeEach: beforeEach,
- afterEach: afterEach,
- spyOn: spyOn,
- waitsFor: waitsFor,
- waits: waits,
- runs: runs,
- jasmine: jasmine,
- expect: expect,
- require: require,
- console: console,
- process: process,
- module: module,
- specLoader: specLoader,
- __dirname: spec.directory(),
- __filename: spec.path(),
- baseUrl: buildRelativeDirName(spec.directory()),
- csPath: __dirname + '/cs'
- };
-
- context.global = context;
-
- return context;
- },
- buildRelativeDirName = function(dir){
- var retVal = "",
- thisDir = ensureUnixPath(process.cwd()),
- toDir = ensureUnixPath(dir).split('/'),
- index = 0;
-
- thisDir = thisDir.split('/');
-
- for(; index < thisDir.length || index < toDir.length; index++) {
- if(thisDir[index] != toDir[index]){
- for(var i = index; i < thisDir.length-1; i++){
- retVal += '../';
- }
-
- for(var i = index; i < toDir.length; i++){
- retVal += toDir[i] + '/';
- }
-
- break;
- }
- }
-
- return retVal.trim('/');
- };
-
- specCollection.getSpecs().forEach(function(s){
- var script = fs.readFileSync(s.path(), 'utf8');
-
- if (s.filename().substr(-6).toLowerCase() == 'coffee') {
- script = coffeescript.compile(script);
- }
-
- var newContext = buildNewContext(s);
- newContext.setTimeout = jasmine.getGlobal().setTimeout;
- newContext.setInterval = jasmine.getGlobal().setInterval;
-
- var vmContext = vm.createContext(newContext);
- vm.runInContext(template, vmContext);
- vm.runInContext(script, vmContext, s.path());
- });
-
- specLoader.executeWhenAllSpecsAreComplete(jasmineEnv);
-};
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js b/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
deleted file mode 100644
index 284db7d..0000000
--- a/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var _ = require('underscore'),
- registry = {},
- timeout = 120000,
- now = function() {
- return new Date().getTime();
- },
- loader = {
- register: function(name) {
- registry[name] = false;
- },
- completed: function(name){
- registry[name] = true;
- }
- },
- specLoader = {
- defineLoader: function(requirejs) {
- requirejs.define('jasmine-spec-loader', function() {
- return loader;
- });
- },
- executeWhenAllSpecsAreComplete: function(jasmineEnv) {
- var allComplete = false,
- wait = now(),
- timeoutCallback = function() {
- allComplete = _.all(registry, function(value) {
- return value;
- });
-
- if(!allComplete && wait + timeout > now()) {
- setTimeout(timeoutCallback, 100);
- } else if (!allComplete) {
- console.log('Failed to load all specs within timeout window.');
- process.exit(-1);
- } else {
- jasmineEnv.execute();
- }
- };
-
- setTimeout(timeoutCallback, 100);
- },
- setTimeoutInterval: function(value) {
- timeout = value;
- },
- };
-
-for(var key in specLoader) {
- exports[key] = specLoader[key];
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js b/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
deleted file mode 100644
index 344daeb..0000000
--- a/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Setup file run before spec files to setup the context (and RequireJS
- * specifically) to execute the spec file.
- *
- * Defined by caller:
- * - Jasmine predefines
- * - require (Node require)
- * - __dirname, __filename
- * - baseUrl (Relative path to the directory containing this file)
- * - csPath (Path to require-cs module)
- *
- * See requirejs-runner source for full invocation details.
- */
-var define,
- requirejsOrig = require('requirejs'),
- ostring = Object.prototype.toString,
- path = require('path'),
- isArray = function(it){
- return ostring.call(it) === '[object Array]';
- },
- isFunction = function(it){
- return ostring.call(it) === '[object Function]';
- },
- requirejs = function(deps, callback){
- var retVal;
-
- if(!isArray(deps) && typeof deps !== 'string'){
- if(isArray(callback)){
- retVal = requirejsOrig(deps, callback, arguments[2]);
- } else {
- retVal = requirejsOrig(deps, [], callback);
- }
- } else {
- retVal = requirejsOrig(deps, callback);
- }
-
- return retVal;
- };
-
-requirejsOrig.config({
- baseUrl: baseUrl,
- nodeRequire: require,
- paths: {
- cs: csPath
- }
-});
-
-for(var key in requirejsOrig) {
- requirejs[key] = requirejsOrig[key];
-}
-
-requirejs.config = function(config){
- var alteredConfig = {};
-
- for(var key in config) {
- alteredConfig[key] = config[key];
- }
-
- if(alteredConfig.baseUrl){
- var base = baseUrl.replace(/\\/g, '/'),
- splitUrl = alteredConfig.baseUrl.replace(/\\/g, '/').split('/'),
- index = 0;
-
- for(; index < splitUrl.length; index++){
- if(splitUrl[index] === '..'){
- base = path.dirname(base);
- } else {
- base += '/' + splitUrl[index];
- }
- }
-
- alteredConfig.baseUrl = base;
- }
-
- return requirejsOrig.config(alteredConfig);
-};
-
-require = requirejs;
-define = requirejs.define;
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js b/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
deleted file mode 100644
index 4b2de89..0000000
--- a/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var walkdir = require('walkdir');
-var path = require('path');
-var fs = require('fs');
-var specs;
-
-var createSpecObj = function(path, root) {
- return {
- path: function() { return path; },
- relativePath: function() { return path.replace(root, '').replace(/^[\/\\]/, '').replace(/\\/g, '/'); },
- directory: function() { return path.replace(/[\/\\][\s\w\.-]*$/, "").replace(/\\/g, '/'); },
- relativeDirectory: function() { return relativePath().replace(/[\/\\][\s\w\.-]*$/, "").replace(/\\/g, '/'); },
- filename: function() { return path.replace(/^.*[\\\/]/, ''); }
- };
-};
-
-exports.load = function(loadpaths, matcher) {
- var wannaBeSpecs = []
- specs = [];
- loadpaths.forEach(function(loadpath){
- wannaBeSpecs = walkdir.sync(loadpath, { follow_symlinks: true });
- for (var i = 0; i < wannaBeSpecs.length; i++) {
- var file = wannaBeSpecs[i];
- try {
- if (fs.statSync(file).isFile()) {
- if (!/.*node_modules.*/.test(path.relative(loadpath, file)) &
- matcher.test(path.basename(file))) {
- specs.push(createSpecObj(file));
- }
- }
- } catch(e) {
- // nothing to do here
- }
- }
- });
-};
-
-exports.getSpecs = function() {
- // Sorts spec paths in ascending alphabetical order to be able to
- // run tests in a deterministic order.
- specs.sort(function(a, b) {
- return a.path().localeCompare(b.path());
- });
- return specs;
-};
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/package.json
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/package.json b/node_modules/jasmine-node/package.json
deleted file mode 100644
index c9dcc1b..0000000
--- a/node_modules/jasmine-node/package.json
+++ /dev/null
@@ -1,106 +0,0 @@
-{
- "_args": [
- [
- {
- "name": "jasmine-node",
- "raw": "jasmine-node@1.14.5",
- "rawSpec": "1.14.5",
- "scope": null,
- "spec": "1.14.5",
- "type": "version"
- },
- "/Users/ctran/cordova/cordova-lib/cordova-create"
- ]
- ],
- "_from": "jasmine-node@1.14.5",
- "_id": "jasmine-node@1.14.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/jasmine-node",
- "_npmUser": {
- "email": "tebriel@gmail.com",
- "name": "tebriel"
- },
- "_npmVersion": "1.4.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "jasmine-node",
- "raw": "jasmine-node@1.14.5",
- "rawSpec": "1.14.5",
- "scope": null,
- "spec": "1.14.5",
- "type": "version"
- },
- "_requiredBy": [
- "#DEV:/"
- ],
- "_resolved": "https://registry.npmjs.org/jasmine-node/-/jasmine-node-1.14.5.tgz",
- "_shasum": "18e8397b856924ee77003666c3731b5aea50c39d",
- "_shrinkwrap": null,
- "_spec": "jasmine-node@1.14.5",
- "_where": "/Users/ctran/cordova/cordova-lib/cordova-create",
- "author": {
- "email": "misko@hevery.com",
- "name": "Misko Hevery"
- },
- "bin": {
- "jasmine-node": "bin/jasmine-node"
- },
- "bugs": {
- "url": "https://github.com/mhevery/jasmine-node/issues"
- },
- "contributors": [
- {
- "email": "chris@moultrie.org",
- "name": "Chris Moultrie"
- }
- ],
- "dependencies": {
- "coffee-script": ">=1.0.1",
- "gaze": "~0.3.2",
- "jasmine-growl-reporter": "~0.0.2",
- "jasmine-reporters": "~1.0.0",
- "mkdirp": "~0.3.5",
- "requirejs": ">=0.27.1",
- "underscore": ">= 1.3.1",
- "walkdir": ">= 0.0.1"
- },
- "description": "DOM-less simple JavaScript BDD testing framework for Node",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "18e8397b856924ee77003666c3731b5aea50c39d",
- "tarball": "https://registry.npmjs.org/jasmine-node/-/jasmine-node-1.14.5.tgz"
- },
- "homepage": "https://github.com/mhevery/jasmine-node",
- "keywords": [
- "testing",
- "bdd"
- ],
- "licenses": [
- "MIT"
- ],
- "main": "lib/jasmine-node",
- "maintainers": [
- {
- "email": "misko@hevery.com",
- "name": "mhevery"
- },
- {
- "email": "chris@moultrie.org",
- "name": "tebriel"
- }
- ],
- "name": "jasmine-node",
- "optionalDependencies": {},
- "preferGlobal": true,
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mhevery/jasmine-node.git"
- },
- "scripts": {
- "test": "node lib/jasmine-node/cli.js spec"
- },
- "version": "1.14.5"
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/scripts/specs
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/scripts/specs b/node_modules/jasmine-node/scripts/specs
deleted file mode 100755
index 28a45f0..0000000
--- a/node_modules/jasmine-node/scripts/specs
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee b/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
deleted file mode 100644
index 4a8f754..0000000
--- a/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
+++ /dev/null
@@ -1,5 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee b/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
deleted file mode 100644
index 05bad4a..0000000
--- a/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
+++ /dev/null
@@ -1,5 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee b/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
deleted file mode 100644
index b0a2250..0000000
--- a/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-define ->
- name: 'CoffeeScript To Test'
- method: (input) -> 2 * input
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js b/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
deleted file mode 100644
index 0cd82b8..0000000
--- a/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/** 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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs/requirejs-setup.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs/requirejs-setup.js b/node_modules/jasmine-node/spec-requirejs/requirejs-setup.js
deleted file mode 100644
index 0cd82b8..0000000
--- a/node_modules/jasmine-node/spec-requirejs/requirejs-setup.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/** 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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs/requirejs-wrapper-template.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs/requirejs-wrapper-template.js b/node_modules/jasmine-node/spec-requirejs/requirejs-wrapper-template.js
deleted file mode 100644
index 344daeb..0000000
--- a/node_modules/jasmine-node/spec-requirejs/requirejs-wrapper-template.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Setup file run before spec files to setup the context (and RequireJS
- * specifically) to execute the spec file.
- *
- * Defined by caller:
- * - Jasmine predefines
- * - require (Node require)
- * - __dirname, __filename
- * - baseUrl (Relative path to the directory containing this file)
- * - csPath (Path to require-cs module)
- *
- * See requirejs-runner source for full invocation details.
- */
-var define,
- requirejsOrig = require('requirejs'),
- ostring = Object.prototype.toString,
- path = require('path'),
- isArray = function(it){
- return ostring.call(it) === '[object Array]';
- },
- isFunction = function(it){
- return ostring.call(it) === '[object Function]';
- },
- requirejs = function(deps, callback){
- var retVal;
-
- if(!isArray(deps) && typeof deps !== 'string'){
- if(isArray(callback)){
- retVal = requirejsOrig(deps, callback, arguments[2]);
- } else {
- retVal = requirejsOrig(deps, [], callback);
- }
- } else {
- retVal = requirejsOrig(deps, callback);
- }
-
- return retVal;
- };
-
-requirejsOrig.config({
- baseUrl: baseUrl,
- nodeRequire: require,
- paths: {
- cs: csPath
- }
-});
-
-for(var key in requirejsOrig) {
- requirejs[key] = requirejsOrig[key];
-}
-
-requirejs.config = function(config){
- var alteredConfig = {};
-
- for(var key in config) {
- alteredConfig[key] = config[key];
- }
-
- if(alteredConfig.baseUrl){
- var base = baseUrl.replace(/\\/g, '/'),
- splitUrl = alteredConfig.baseUrl.replace(/\\/g, '/').split('/'),
- index = 0;
-
- for(; index < splitUrl.length; index++){
- if(splitUrl[index] === '..'){
- base = path.dirname(base);
- } else {
- base += '/' + splitUrl[index];
- }
- }
-
- alteredConfig.baseUrl = base;
- }
-
- return requirejsOrig.config(alteredConfig);
-};
-
-require = requirejs;
-define = requirejs.define;
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js b/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
deleted file mode 100644
index 5e7bddb..0000000
--- a/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
+++ /dev/null
@@ -1,19 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js b/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
deleted file mode 100644
index 1d5095f..0000000
--- a/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
+++ /dev/null
@@ -1,8 +0,0 @@
-define(function(){
- return {
- name: 'Subject To Test',
- method: function(input){
- return 1+input;
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec/AsyncSpec.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/AsyncSpec.coffee b/node_modules/jasmine-node/spec/AsyncSpec.coffee
deleted file mode 100644
index a6e160d..0000000
--- a/node_modules/jasmine-node/spec/AsyncSpec.coffee
+++ /dev/null
@@ -1,11 +0,0 @@
-#=============================================================================
-# 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-create/blob/9fb2883e/node_modules/jasmine-node/spec/CoffeeSpec.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/CoffeeSpec.coffee b/node_modules/jasmine-node/spec/CoffeeSpec.coffee
deleted file mode 100755
index 757da61..0000000
--- a/node_modules/jasmine-node/spec/CoffeeSpec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'jasmine-node', ->
-
- it 'should pass', ->
- expect(1+2).toEqual(3)
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec/GrammarHelper.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/GrammarHelper.coffee b/node_modules/jasmine-node/spec/GrammarHelper.coffee
deleted file mode 100644
index 507fd58..0000000
--- a/node_modules/jasmine-node/spec/GrammarHelper.coffee
+++ /dev/null
@@ -1,22 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/HelperSpec.coffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/HelperSpec.coffee b/node_modules/jasmine-node/spec/HelperSpec.coffee
deleted file mode 100644
index 16498c0..0000000
--- a/node_modules/jasmine-node/spec/HelperSpec.coffee
+++ /dev/null
@@ -1,6 +0,0 @@
-
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/SampleSpecs.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/SampleSpecs.js b/node_modules/jasmine-node/spec/SampleSpecs.js
deleted file mode 100755
index f9c001b..0000000
--- a/node_modules/jasmine-node/spec/SampleSpecs.js
+++ /dev/null
@@ -1,25 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/TestSpec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/TestSpec.js b/node_modules/jasmine-node/spec/TestSpec.js
deleted file mode 100755
index 36441c0..0000000
--- a/node_modules/jasmine-node/spec/TestSpec.js
+++ /dev/null
@@ -1,100 +0,0 @@
-
-describe('jasmine-node-flat', function(){
- it('should pass', function(){
- expect(1+2).toEqual(3);
- });
-});
-
-describe('beforeEach Timeout', function(){
- beforeEach(function(done) {
- setTimeout(done, 1000);
- }, 100);
- it('should fail', function(){
- expect(1+2).toEqual(3);
- });
-});
-
-describe('afterEach Timeout', function(){
- afterEach(function(done) {
- setTimeout(done, 1000);
- }, 100);
- it('should pass and then afterEach will fail', 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-create/blob/9fb2883e/node_modules/jasmine-node/spec/TimerSpec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/TimerSpec.js b/node_modules/jasmine-node/spec/TimerSpec.js
deleted file mode 100644
index 00d584c..0000000
--- a/node_modules/jasmine-node/spec/TimerSpec.js
+++ /dev/null
@@ -1,34 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/async-callback_spec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/async-callback_spec.js b/node_modules/jasmine-node/spec/async-callback_spec.js
deleted file mode 100644
index 79bd754..0000000
--- a/node_modules/jasmine-node/spec/async-callback_spec.js
+++ /dev/null
@@ -1,174 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/helper_spec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/helper_spec.js b/node_modules/jasmine-node/spec/helper_spec.js
deleted file mode 100644
index d157fd2..0000000
--- a/node_modules/jasmine-node/spec/helper_spec.js
+++ /dev/null
@@ -1,7 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee b/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
deleted file mode 100644
index 77eb791..0000000
--- a/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
+++ /dev/null
@@ -1,9 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/nested.js/NestedSpec.js b/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
deleted file mode 100644
index e63ee64..0000000
--- a/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
+++ /dev/null
@@ -1,5 +0,0 @@
-describe('jasmine-node-nested.js', function(){
- it('should pass', function(){
- expect(1+2).toEqual(3);
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec/nested/NestedSpec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/nested/NestedSpec.js b/node_modules/jasmine-node/spec/nested/NestedSpec.js
deleted file mode 100755
index 6d27d30..0000000
--- a/node_modules/jasmine-node/spec/nested/NestedSpec.js
+++ /dev/null
@@ -1,5 +0,0 @@
-describe('jasmine-node-nested', function(){
- it('should pass', function(){
- expect(1+2).toEqual(3);
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js b/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
deleted file mode 100755
index 146203b..0000000
--- a/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-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-create/blob/9fb2883e/node_modules/jasmine-node/spec/reporter_spec.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/reporter_spec.js b/node_modules/jasmine-node/spec/reporter_spec.js
deleted file mode 100644
index 19cdddd..0000000
--- a/node_modules/jasmine-node/spec/reporter_spec.js
+++ /dev/null
@@ -1,495 +0,0 @@
-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();
- spec = {
- results: function() {
- var _results = {
- skipped: false
- }
- return _results;
- }
- };
- _specs.push(spec);
- 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, 0 skipped\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 = {
- id: 17,
- 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',
- runtime: 200
- };
-
- this.verboseReporter.suiteResults_['17'] = {
- runtime: 500
- };
-
- });
-
- 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 - 500 ms');
- });
-
- 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 - 200 ms');
- });
-
- 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.id = '29';
- 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.suiteResults_['29'] = {
- runtime: 350
- };
-
- this.verboseReporter.buildMessagesFromResults_(messages, results);
-
- expect(messages.length).toEqual(5);
- expect(messages[0]).toEqual('');
- expect(messages[1]).toEqual('a describe block - 500 ms');
- expect(messages[2]).toEqual('');
- expect(messages[3]).toEqual(' a sub describe block - 350 ms');
- expect(messages[4]).toEqual(' a spec block - 200 ms');
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-node/spec/sample_helper.js
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/spec/sample_helper.js b/node_modules/jasmine-node/spec/sample_helper.js
deleted file mode 100644
index 9f8032f..0000000
--- a/node_modules/jasmine-node/spec/sample_helper.js
+++ /dev/null
@@ -1,15 +0,0 @@
-(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-create/blob/9fb2883e/node_modules/jasmine-node/specs.sh
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-node/specs.sh b/node_modules/jasmine-node/specs.sh
deleted file mode 100755
index 8f8011d..0000000
--- a/node_modules/jasmine-node/specs.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-entry="node lib/jasmine-node/cli.js --noStack "
-
-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 59 tests and 104 assertions and 4 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 64 tests and 109 assertions and 6 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 59 tests and 104 assertions and 4 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"
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-reporters/.npmignore
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-reporters/.npmignore b/node_modules/jasmine-reporters/.npmignore
deleted file mode 100644
index e8a93ed..0000000
--- a/node_modules/jasmine-reporters/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-*.pyc
-*.swp
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-reporters/LICENSE
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-reporters/LICENSE b/node_modules/jasmine-reporters/LICENSE
deleted file mode 100644
index fcc702f..0000000
--- a/node_modules/jasmine-reporters/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2010 Larry Myers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/jasmine-reporters/README.markdown
----------------------------------------------------------------------
diff --git a/node_modules/jasmine-reporters/README.markdown b/node_modules/jasmine-reporters/README.markdown
deleted file mode 100644
index 0367b10..0000000
--- a/node_modules/jasmine-reporters/README.markdown
+++ /dev/null
@@ -1,59 +0,0 @@
-This branch is for Jasmine 1.x.
-[Switch to the 2.x branch.](https://github.com/larrymyers/jasmine-reporters)
-
-# Jasmine Reporters
-
-Jasmine Reporters is a collection of javascript jasmine.Reporter classes that can be used with
-the [JasmineBDD testing framework](http://jasmine.github.io/).
-
-Included reporters:
-
-* ConsoleReporter - Report test results to the browser console.
-* JUnitXmlReporter - Report test results to a file in JUnit XML Report format.
-* NUnitXmlReporter - Report test results to a file in NUnit XML Report format.
-* TapReporter - Test Anything Protocol, report tests results to console.
-* TeamcityReporter - Basic reporter that outputs spec results to for the Teamcity build system.
-* TerminalReporter - Logs to a terminal (including colors) with variable verbosity.
-
-## Usage
-
-Examples are included in the test directory that show how to use the reporters,
-as well a basic runner scripts for Rhino + envjs, and a basic runner for
-[PhantomJS](https://github.com/ariya/phantomjs). Either of these methods could
-be used in a Continuous Integration project for running headless tests and
-generating JUnit XML output.
-
-### Rhino + EnvJS
-
-Everything needed to run the tests in Rhino + EnvJS is included in this
-repository inside the `ext` directory, specifically Rhino 1.7r2 and envjs 1.2
-for Rhino.
-
-### PhantomJS
-
-Should work in most versions of PhantomJS > 1.4.1
-I have used PhantomJS 1.4.1 through 1.9.6 on Mac OS X with no problems.
-
-### Node.js
-
-Most of these reporters also work in node.js by making use of the excellent
-[jasmine-node project](https://github.com/mhevery/jasmine-node).
-
-# Protractor
-
-Protractor 1.6.0 or above allows you to use either Jasmine 1 or Jasmine 2.
-If you are using Jasmine 1, make sure you install a 1.x-compatible version of jasmine-reporters:
-
- npm install --save-dev jasmine-reporters@^1.0.0
-
-Then set everything up inside your protractor.conf:
-
- onPrepare: function() {
- // The require statement must be down here, since jasmine-reporters@1.0
- // expects jasmine to be in the global and protractor does not guarantee
- // this until inside the onPrepare function.
- require('jasmine-reporters');
- jasmine.getEnv().addReporter(
- new jasmine.JUnitXmlReporter('xmloutput', true, true)
- );
- }
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org