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 2012/09/12 00:59:40 UTC
[14/14] updated package.json
http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/blob/1d113e44/node_modules/nodeunit/test/test-testcase.js
----------------------------------------------------------------------
diff --git a/node_modules/nodeunit/test/test-testcase.js b/node_modules/nodeunit/test/test-testcase.js
deleted file mode 100644
index 5d33b0b..0000000
--- a/node_modules/nodeunit/test/test-testcase.js
+++ /dev/null
@@ -1,256 +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.testTestCase = function (test) {
- test.expect(7);
- var call_order = [];
- var s = {
- setUp: function (callback) {
- call_order.push('setUp');
- test.equals(this.one, undefined, 'in setUp, this.one not set');
- 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, 'in test1, this.one is 1');
- this.one = 2;
- t.done();
- },
- test2: function (t) {
- call_order.push('test2');
- test.equals(this.one, 1, 'in test2, this.one is still 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 = {
- 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 = {
- 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 = {
- 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 = {
- 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 = {
- 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 = {
- 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 = {
- 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 = {
- 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: {
- 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();
- });
-};
-
-exports.deepNestedTestCases = function (test) {
- var val = 'foo';
- var s = {
- setUp: function (callback) {
- val = 'bar';
- callback();
- },
- group1: {
- test: {
- test2: function (test) {
- test.equal(val, 'bar');
- test.done();
- }
- }
- }
- };
- nodeunit.runSuite(null, s, {}, function (err, assertions) {
- test.ok(!assertions[0].failed());
- test.equal(assertions.length, 1);
- test.done();
- });
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/blob/1d113e44/node_modules/nodeunit/test/test.html
----------------------------------------------------------------------
diff --git a/node_modules/nodeunit/test/test.html b/node_modules/nodeunit/test/test.html
deleted file mode 100644
index e0826de..0000000
--- a/node_modules/nodeunit/test/test.html
+++ /dev/null
@@ -1,28 +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>
- <script src="test-testcase-legacy.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,
- 'test-testcase-legacy': test_testcase_legacy
- });
- </script>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/blob/1d113e44/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 78a8487..7326549 100644
--- a/package.json
+++ b/package.json
@@ -6,11 +6,6 @@
"directories": {
"test": "test"
},
- "dependencies": {
- "async": "~0.1.15",
- "nodeunit": "~0.6.4",
- "procstreams": "~0.2.0"
- },
"devDependencies": {
"coffee-script": "~1.2.0"
},