From 6afa63fb3861eb000887a4f0c0ca3dfb37a204f5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 14 Jun 2012 14:35:53 +0000 Subject: [PATCH] mv test.sh to test folder --- package.json | 2 +- test.sh | 3 --- test/.jshintrc | 10 ++++++++++ test/test.js | 26 -------------------------- test/test.sh | 7 +++---- 5 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 test.sh create mode 100644 test/.jshintrc delete mode 100644 test/test.js diff --git a/package.json b/package.json index e21b9e3e..91f644dc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cloudcmd", "version": "0.0.1", - "scripts":{"test":"sh test.sh","start": "server.js"}, + "scripts":{"test":"sh test/test.sh","start": "server.js"}, "engines": { "node": "0.6.x" }, "subdomain": "cloudcmd" } \ No newline at end of file diff --git a/test.sh b/test.sh deleted file mode 100644 index 75af5c73..00000000 --- a/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -npm install -g jshint -jshint *.js --config .jshintrc \ No newline at end of file diff --git a/test/.jshintrc b/test/.jshintrc new file mode 100644 index 00000000..c662b415 --- /dev/null +++ b/test/.jshintrc @@ -0,0 +1,10 @@ +{ + "validthis": true, + "laxcomma" : true, + "laxbreak" : true, + "browser" : true, + "debug" : true, + "boss" : true, + "expr" : true, + "asi" : true +} \ No newline at end of file diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 4def62d5..00000000 --- a/test/test.js +++ /dev/null @@ -1,26 +0,0 @@ -var util = require('util'), - exec = require('child_process').exec; - - - -exec('curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_1)); - -var _1 = function(){exec('tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_2));} -var _2 = function(){exec('./phantomjs/bin/phantomjs',makeExecFunctoin(_3));}; -var _3 = function(){exec('ls',makeExecFunctoin());}; -var i; -function makeExecFunctoin(pFunc){ - return function(error, stdout, stderr) { - console.log('stdout: ' + stdout); - console.log('stderr: ' + stderr); - - if (error !== null) { - console.log('exec error: ' + error); - } - else if(pFunc && - typeof pFunc==='function'){ - console.log(i++); - pFunc(); - } - }; -} \ No newline at end of file diff --git a/test/test.sh b/test/test.sh index f27eec2c..75af5c73 100644 --- a/test/test.sh +++ b/test/test.sh @@ -1,4 +1,3 @@ -#!/bin/sh -curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz -tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz -./phantomjs/bin/phantomjs \ No newline at end of file +#!/bin/sh +npm install -g jshint +jshint *.js --config .jshintrc \ No newline at end of file