incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [8/19] removed node modules from version control, whoops
Date Wed, 13 Jun 2012 17:09:08 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test-runfiles.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test-runfiles.js b/bin/node_modules/nodeunit/test/test-runfiles.js
deleted file mode 100644
index 9cbf519..0000000
--- a/bin/node_modules/nodeunit/test/test-runfiles.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var assert = require('assert'),
-    fs = require('fs'),
-    path = require('path'),
-    nodeunit = require('../lib/nodeunit');
-
-
-var setup = function (fn) {
-    return function (test) {
-        process.chdir(__dirname);
-        require.paths.push(__dirname);
-        var env = {
-            mock_module1: require('./fixtures/mock_module1'),
-            mock_module2: require('./fixtures/mock_module2'),
-            mock_module3: require('./fixtures/dir/mock_module3'),
-            mock_module4: require('./fixtures/dir/mock_module4')
-        };
-        fn.call(env, test);
-    };
-};
-
-
-exports.testRunFiles = setup(function (test) {
-    test.expect(24);
-    var runModule_copy = nodeunit.runModule;
-
-    var runModule_calls = [];
-    var modules = [];
-
-    var opts = {
-        moduleStart: function () {
-            return 'moduleStart';
-        },
-        testDone: function () {
-            return 'testDone';
-        },
-        testStart: function () {
-            return 'testStart';
-        },
-        log: function () {
-            return 'log';
-        },
-        done: function (assertions) {
-            test.equals(assertions.failures(), 0, 'failures');
-            test.equals(assertions.length, 4, 'length');
-            test.ok(typeof assertions.duration === "number");
-
-            var called_with = function (name) {
-                return runModule_calls.some(function (m) {
-                    return m.name === name;
-                });
-            };
-            test.ok(called_with('mock_module1'), 'mock_module1 ran');
-            test.ok(called_with('mock_module2'), 'mock_module2 ran');
-            test.ok(called_with('mock_module3'), 'mock_module3 ran');
-            test.ok(called_with('mock_module4'), 'mock_module4 ran');
-            test.equals(runModule_calls.length, 4);
-
-            nodeunit.runModule = runModule_copy;
-            test.done();
-        }
-    };
-
-    nodeunit.runModule = function (name, mod, options, callback) {
-        test.equals(options.testDone, opts.testDone);
-        test.equals(options.testStart, opts.testStart);
-        test.equals(options.log, opts.log);
-        test.ok(typeof name === "string");
-        runModule_calls.push(mod);
-        var m = [{failed: function () {
-            return false;
-        }}];
-        modules.push(m);
-        callback(null, m);
-    };
-
-    nodeunit.runFiles(
-        ['fixtures/mock_module1.js', 'fixtures/mock_module2.js', 'fixtures/dir'],
-        opts
-    );
-});
-
-exports.testRunFilesEmpty = function (test) {
-    test.expect(3);
-    nodeunit.runFiles([], {
-        moduleStart: function () {
-            test.ok(false, 'should not be called');
-        },
-        testDone: function () {
-            test.ok(false, 'should not be called');
-        },
-        testStart: function () {
-            test.ok(false, 'should not be called');
-        },
-        log: function () {
-            test.ok(false, 'should not be called');
-        },
-        done: function (assertions) {
-            test.equals(assertions.failures(), 0, 'failures');
-            test.equals(assertions.length, 0, 'length');
-            test.ok(typeof assertions.duration === "number");
-            test.done();
-        }
-    });
-};
-
-
-exports.testEmptyDir = function (test) {
-    var dir2 = __dirname + '/fixtures/dir2';
-
-    // git doesn't like empty directories, so we have to create one
-    path.exists(dir2, function (exists) {
-        if (!exists) {
-            fs.mkdirSync(dir2, 0777);
-        }
-
-        // runFiles on empty directory:
-        nodeunit.runFiles([dir2], {
-            moduleStart: function () {
-                test.ok(false, 'should not be called');
-            },
-            testDone: function () {
-                test.ok(false, 'should not be called');
-            },
-            testStart: function () {
-                test.ok(false, 'should not be called');
-            },
-            log: function () {
-                test.ok(false, 'should not be called');
-            },
-            done: function (assertions) {
-                test.equals(assertions.failures(), 0, 'failures');
-                test.equals(assertions.length, 0, 'length');
-                test.ok(typeof assertions.duration === "number");
-                test.done();
-            }
-        });
-    });
-};
-
-
-var CoffeeScript;
-try {
-    CoffeeScript = require('coffee-script');
-} catch (e) {
-}
-
-if (CoffeeScript) {
-    exports.testCoffeeScript = function (test) {
-        process.chdir(__dirname);
-        require.paths.push(__dirname);
-        var env = {
-            mock_coffee_module: require('./fixtures/coffee/mock_coffee_module')
-        };
-
-        test.expect(9);
-        var runModule_copy = nodeunit.runModule;
-
-        var runModule_calls = [];
-        var modules = [];
-
-        var opts = {
-            moduleStart: function () {
-                return 'moduleStart';
-            },
-            testDone: function () {
-                return 'testDone';
-            },
-            testStart: function () {
-                return 'testStart';
-            },
-            log: function () {
-                return 'log';
-            },
-            done: function (assertions) {
-                test.equals(assertions.failures(), 0, 'failures');
-                test.equals(assertions.length, 1, 'length');
-                test.ok(typeof assertions.duration === "number");
-
-                var called_with = function (name) {
-                    return runModule_calls.some(function (m) {
-                        return m.name === name;
-                    });
-                };
-                test.ok(
-                    called_with('mock_coffee_15'),
-                    'mock_coffee_module ran'
-                );
-                test.equals(runModule_calls.length, 1);
-
-                nodeunit.runModule = runModule_copy;
-                test.done();
-            }
-        };
-
-        nodeunit.runModule = function (name, mod, options, callback) {
-            test.equals(options.testDone, opts.testDone);
-            test.equals(options.testStart, opts.testStart);
-            test.equals(options.log, opts.log);
-            test.ok(typeof name === "string");
-            runModule_calls.push(mod);
-            var m = [{failed: function () {
-                return false;
-            }}];
-            modules.push(m);
-            callback(null, m);
-        };
-
-        nodeunit.runFiles(
-            ['fixtures/coffee/mock_coffee_module.coffee'],
-            opts
-        );
-    };
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test-runmodule.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test-runmodule.js b/bin/node_modules/nodeunit/test/test-runmodule.js
deleted file mode 100644
index d07b47c..0000000
--- a/bin/node_modules/nodeunit/test/test-runmodule.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/*  THIS FILE SHOULD BE BROWSER-COMPATIBLE JS!
- *  You can use @REMOVE_LINE_FOR_BROWSER to remove code from the browser build.
- *  Only code on that line will be removed, its mostly to avoid requiring code
- *  that is node specific
- */
-
-var nodeunit = require('../lib/nodeunit'); // @REMOVE_LINE_FOR_BROWSER
-
-
-exports.testRunModule = function (test) {
-    test.expect(11);
-    var call_order = [];
-    var testmodule = {
-        test1: function (test) {
-            call_order.push('test1');
-            test.ok(true, 'ok true');
-            test.done();
-        },
-        test2: function (test) {
-            call_order.push('test2');
-            test.ok(false, 'ok false');
-            test.ok(false, 'ok false');
-            test.done();
-        },
-        test3: function (test) {
-            call_order.push('test3');
-            test.done();
-        }
-    };
-    nodeunit.runModule('testmodule', testmodule, {
-        log: function (assertion) {
-            call_order.push('log');
-        },
-        testStart: function (name) {
-            call_order.push('testStart');
-            test.ok(
-                name.toString() === 'test1' ||
-                name.toString() === 'test2' ||
-                name.toString() === 'test3',
-                'testStart called with test name '
-            );
-        },
-        testDone: function (name, assertions) {
-            call_order.push('testDone');
-            test.ok(
-                name.toString() === 'test1' ||
-                name.toString() === 'test2' ||
-                name.toString() === 'test3',
-                'testDone called with test name'
-            );
-        },
-        moduleDone: function (name, assertions) {
-            call_order.push('moduleDone');
-            test.equals(assertions.length, 3);
-            test.equals(assertions.failures(), 2);
-            test.equals(name, 'testmodule');
-            test.ok(typeof assertions.duration === "number");
-            test.same(call_order, [
-                'testStart', 'test1', 'log', 'testDone',
-                'testStart', 'test2', 'log', 'log', 'testDone',
-                'testStart', 'test3', 'testDone',
-                'moduleDone'
-            ]);
-        }
-    }, test.done);
-};
-
-
-exports.testRunModuleTestSpec = function (test) {
-    test.expect(6);
-    var call_order = [];
-    var testmodule = {
-        test1: function (test) {
-            test.ok(true, 'ok true');
-            test.done();
-        },
-        test2: function (test) {
-            call_order.push('test2');
-            test.ok(false, 'ok false');
-            test.ok(false, 'ok false');
-            test.done();
-        },
-        test3: function (test) {
-            test.done();
-        }
-    };
-    nodeunit.runModule('testmodule', testmodule, {
-        testspec: "test2",
-        log: function (assertion) {
-            call_order.push('log');
-        },
-        testStart: function (name) {
-            call_order.push('testStart');
-            test.ok(
-                name.toString() === 'test2',
-                'testStart called with test name '
-            );
-        },
-        testDone: function (name, assertions) {
-            call_order.push('testDone');
-            test.ok(
-                name.toString() === 'test2',
-                'testDone called with test name'
-            );
-        },
-        moduleDone: function (name, assertions) {
-            call_order.push('moduleDone');
-            test.equals(assertions.length, 2);
-            test.equals(name, 'testmodule');
-            test.ok(typeof assertions.duration === "number");
-            test.same(call_order, [
-                'testStart', 'test2', 'log', 'log', 'testDone',
-                'moduleDone'
-            ]);
-        }
-    }, test.done);
-};
-
-exports.testRunModuleEmpty = function (test) {
-    nodeunit.runModule('module with no exports', {}, {
-        log: function (assertion) {
-            test.ok(false, 'log should not be called');
-        },
-        testStart: function (name) {
-            test.ok(false, 'testStart should not be called');
-        },
-        testDone: function (name, assertions) {
-            test.ok(false, 'testDone should not be called');
-        },
-        moduleDone: function (name, assertions) {
-            test.equals(assertions.length, 0);
-            test.equals(assertions.failures(), 0);
-            test.equals(name, 'module with no exports');
-            test.ok(typeof assertions.duration === "number");
-        }
-    }, test.done);
-};
-
-
-exports.testNestedTests = function (test) {
-    var call_order = [];
-    var m = {
-        test1: function (test) {
-            test.done();
-        },
-        suite: {
-            t1: function (test) {
-                test.done();
-            },
-            t2: function (test) {
-                test.done();
-            },
-            another_suite: {
-                t3: function (test) {
-                    test.done();
-                }
-            }
-        }
-    };
-    nodeunit.runModule('modulename', m, {
-        testStart: function (name) {
-            call_order.push(['testStart'].concat(name));
-        },
-        testDone: function (name, assertions) {
-            call_order.push(['testDone'].concat(name));
-        }
-    }, function () {
-        test.same(call_order, [
-            ['testStart', 'test1'], ['testDone', 'test1'],
-            ['testStart', 'suite', 't1'], ['testDone', 'suite', 't1'],
-            ['testStart', 'suite', 't2'], ['testDone', 'suite', 't2'],
-            ['testStart', 'suite', 'another_suite', 't3'],
-            ['testDone', 'suite', 'another_suite', 't3']
-        ]);
-        test.done();
-    });
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test-runtest.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test-runtest.js b/bin/node_modules/nodeunit/test/test-runtest.js
deleted file mode 100644
index 8fc3d52..0000000
--- a/bin/node_modules/nodeunit/test/test-runtest.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*  THIS FILE SHOULD BE BROWSER-COMPATIBLE JS!
- *  You can use @REMOVE_LINE_FOR_BROWSER to remove code from the browser build.
- *  Only code on that line will be removed, its mostly to avoid requiring code
- *  that is node specific
- */
-
-var nodeunit = require('../lib/nodeunit'); // @REMOVE_LINE_FOR_BROWSER
-
-
-exports.testArgs = function (test) {
-    test.ok(test.expect instanceof Function, 'test.expect');
-    test.ok(test.done instanceof Function, 'test.done');
-    test.ok(test.ok instanceof Function, 'test.ok');
-    test.ok(test.same instanceof Function, 'test.same');
-    test.ok(test.equals instanceof Function, 'test.equals');
-    test.done();
-};
-
-exports.testDoneCallback = function (test) {
-    test.expect(4);
-    nodeunit.runTest('testname', exports.testArgs, {
-        testDone: function (name, assertions) {
-            test.equals(assertions.failures(), 0, 'failures');
-            test.equals(assertions.length, 5, 'length');
-            test.ok(typeof assertions.duration === "number");
-            test.equals(name, 'testname');
-        }
-    }, test.done);
-};
-
-exports.testThrowError = function (test) {
-    test.expect(3);
-    var err = new Error('test');
-    var testfn = function (test) {
-        throw err;
-    };
-    nodeunit.runTest('testname', testfn, {
-        log: function (assertion) {
-            test.same(assertion.error, err, 'assertion.error');
-        },
-        testDone: function (name, assertions) {
-            test.equals(assertions.failures(), 1);
-            test.equals(assertions.length, 1);
-        }
-    }, test.done);
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test-sandbox.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test-sandbox.js b/bin/node_modules/nodeunit/test/test-sandbox.js
deleted file mode 100644
index 1b249d7..0000000
--- a/bin/node_modules/nodeunit/test/test-sandbox.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var nodeunit = require('../lib/nodeunit');
-var sandbox = require('../lib/utils').sandbox;
-var testCase = nodeunit.testCase;
-
-exports.testSimpleSandbox = function (test) {
-    var raw_jscode1 = sandbox(__dirname + '/fixtures/raw_jscode1.js');
-    test.equal(raw_jscode1.hello_world('foo'), '_foo_', 'evaluation ok');
-    test.done();
-};
-
-exports.testSandboxContext = function (test) {
-    var a_variable = 42; // should not be visible in the sandbox
-    var raw_jscode2 = sandbox(__dirname + '/fixtures/raw_jscode2.js');
-    a_variable = 42; // again for the win
-    test.equal(
-        raw_jscode2.get_a_variable(),
-        'undefined',
-        'the variable should not be defined'
-    );
-    test.done();
-};
-
-exports.testSandboxMultiple = function (test) {
-    var raw_jscode3 = sandbox([
-        __dirname + '/fixtures/raw_jscode3.js',
-        __dirname + '/fixtures/raw_jscode3.js',
-        __dirname + '/fixtures/raw_jscode3.js'
-    ]);
-    test.equal(raw_jscode3.t, 3, 'two files loaded');
-    test.done();
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test-testcase.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test-testcase.js b/bin/node_modules/nodeunit/test/test-testcase.js
deleted file mode 100644
index a3ea331..0000000
--- a/bin/node_modules/nodeunit/test/test-testcase.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/*  THIS FILE SHOULD BE BROWSER-COMPATIBLE JS!
- *  You can use @REMOVE_LINE_FOR_BROWSER to remove code from the browser build.
- *  Only code on that line will be removed, its mostly to avoid requiring code
- *  that is node specific
- */
-
-var nodeunit = require('../lib/nodeunit'); // @REMOVE_LINE_FOR_BROWSER
-var testCase = nodeunit.testCase;
-
-exports.testTestCase = function (test) {
-    test.expect(7);
-    var call_order = [];
-    var s = testCase({
-        setUp: function (callback) {
-            call_order.push('setUp');
-            test.equals(this.one, undefined);
-            this.one = 1;
-            callback();
-        },
-        tearDown: function (callback) {
-            call_order.push('tearDown');
-            test.ok(true, 'tearDown called');
-            callback();
-        },
-        test1: function (t) {
-            call_order.push('test1');
-            test.equals(this.one, 1);
-            this.one = 2;
-            t.done();
-        },
-        test2: function (t) {
-            call_order.push('test2');
-            test.equals(this.one, 1);
-            t.done();
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function () {
-        test.same(call_order, [
-            'setUp', 'test1', 'tearDown',
-            'setUp', 'test2', 'tearDown'
-        ]);
-        test.done();
-    });
-};
-
-exports.tearDownAfterError = function (test) {
-    test.expect(1);
-    var s = testCase({
-        tearDown: function (callback) {
-            test.ok(true, 'tearDown called');
-            callback();
-        },
-        test: function (t) {
-            throw new Error('some error');
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function () {
-        test.done();
-    });
-};
-
-exports.catchSetUpError = function (test) {
-    test.expect(2);
-    var test_error = new Error('test error');
-    var s = testCase({
-        setUp: function (callback) {
-            throw test_error;
-        },
-        test: function (t) {
-            test.ok(false, 'test function should not be called');
-            t.done();
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.equal(assertions.length, 1);
-        test.equal(assertions[0].error, test_error);
-        test.done();
-    });
-};
-
-exports.setUpErrorCallback = function (test) {
-    test.expect(2);
-    var test_error = new Error('test error');
-    var s = testCase({
-        setUp: function (callback) {
-            callback(test_error);
-        },
-        test: function (t) {
-            test.ok(false, 'test function should not be called');
-            t.done();
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.equal(assertions.length, 1);
-        test.equal(assertions[0].error, test_error);
-        test.done();
-    });
-};
-
-exports.catchTearDownError = function (test) {
-    test.expect(2);
-    var test_error = new Error('test error');
-    var s = testCase({
-        tearDown: function (callback) {
-            throw test_error;
-        },
-        test: function (t) {
-            t.done();
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.equal(assertions.length, 1);
-        test.equal(assertions[0].error, test_error);
-        test.done();
-    });
-};
-
-exports.tearDownErrorCallback = function (test) {
-    test.expect(2);
-    var test_error = new Error('test error');
-    var s = testCase({
-        tearDown: function (callback) {
-            callback(test_error);
-        },
-        test: function (t) {
-            t.done();
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.equal(assertions.length, 1);
-        test.equal(assertions[0].error, test_error);
-        test.done();
-    });
-};
-
-exports.testErrorAndtearDownError = function (test) {
-    test.expect(3);
-    var error1 = new Error('test error one');
-    var error2 = new Error('test error two');
-    var s = testCase({
-        tearDown: function (callback) {
-            callback(error2);
-        },
-        test: function (t) {
-            t.done(error1);
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.equal(assertions.length, 2);
-        test.equal(assertions[0].error, error1);
-        test.equal(assertions[1].error, error2);
-        test.done();
-    });
-};
-
-exports.testCaseGroups = function (test) {
-    var call_order = [];
-    var s = testCase({
-        setUp: function (callback) {
-            call_order.push('setUp');
-            callback();
-        },
-        tearDown: function (callback) {
-            call_order.push('tearDown');
-            callback();
-        },
-        test1: function (test) {
-            call_order.push('test1');
-            test.done();
-        },
-        group1: {
-            test2: function (test) {
-                call_order.push('group1.test2');
-                test.done();
-            }
-        }
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.same(call_order, [
-            'setUp',
-            'test1',
-            'tearDown',
-            'setUp',
-            'group1.test2',
-            'tearDown'
-        ]);
-        test.done();
-    });
-};
-
-exports.nestedTestCases = function (test) {
-    var call_order = [];
-    var s = testCase({
-        setUp: function (callback) {
-            call_order.push('setUp');
-            callback();
-        },
-        tearDown: function (callback) {
-            call_order.push('tearDown');
-            callback();
-        },
-        test1: function (test) {
-            call_order.push('test1');
-            test.done();
-        },
-        group1: testCase({
-            setUp: function (callback) {
-                call_order.push('group1.setUp');
-                callback();
-            },
-            tearDown: function (callback) {
-                call_order.push('group1.tearDown');
-                callback();
-            },
-            test2: function (test) {
-                call_order.push('group1.test2');
-                test.done();
-            }
-        })
-    });
-    nodeunit.runSuite(null, s, {}, function (err, assertions) {
-        test.same(call_order, [
-            'setUp',
-            'test1',
-            'tearDown',
-            'setUp',
-            'group1.setUp',
-            'group1.test2',
-            'group1.tearDown',
-            'tearDown'
-        ]);
-        test.done();
-    });
-};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/2329a568/bin/node_modules/nodeunit/test/test.html
----------------------------------------------------------------------
diff --git a/bin/node_modules/nodeunit/test/test.html b/bin/node_modules/nodeunit/test/test.html
deleted file mode 100644
index 31bda30..0000000
--- a/bin/node_modules/nodeunit/test/test.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-  <head>
-    <title>Nodeunit Test Suite</title>
-    <!--
-      Note this file is only used for 'make browser', when it is copied to
-      dist/browser/test.html for running the browser test suite
-    -->
-    <link rel="stylesheet" href="nodeunit.css" type="text/css" media="screen" />
-    <script src="nodeunit.js"></script>
-    <script src="test-base.js"></script>
-    <script src="test-runmodule.js"></script>
-    <script src="test-runtest.js"></script>
-    <script src="test-testcase.js"></script>
-  </head>
-  <body>
-    <h1 id="nodeunit-header">Nodeunit Test Suite</h1>
-    <script>
-      nodeunit.run({
-        'test-base': test_base,
-        'test-runmodule': test_runmodule,
-        'test-runtest': test_runtest,
-        'test-testcase': test_testcase
-      });
-    </script>
-  </body>
-</html>


Mime
View raw message