[Groonga-commit] groonga/gcs-console [master] Get compatible with older nodes than 0.8

アーカイブの一覧に戻る

Yoji SHIDARA null+****@clear*****
Wed Oct 24 11:50:50 JST 2012


Yoji SHIDARA	2012-10-24 11:50:50 +0900 (Wed, 24 Oct 2012)

  New Revision: 7b3ba01fda2101675f4c6561ddb867a0f147bf59
  https://github.com/groonga/gcs-console/commit/7b3ba01fda2101675f4c6561ddb867a0f147bf59

  Merged 610da59: Merge branch 'test'

  Log:
    Get compatible with older nodes than 0.8

  Modified files:
    test/index.test.js

  Modified: test/index.test.js (+3 -1)
===================================================================
--- test/index.test.js    2012-10-24 11:36:42 +0900 (2ad1fd6)
+++ test/index.test.js    2012-10-24 11:50:50 +0900 (30f03b9)
@@ -4,6 +4,8 @@ var spawn = require('child_process').spawn;
 var mkdirp = require('mkdirp');
 var rimraf = require('rimraf');
 var fs = require('fs');
+var path = require('path');
+var existsSync = fs.existsSync || path.existsSync; // to support older nodes than 0.8
 
 // TODO extract these test helpers to another file
 
@@ -33,7 +35,7 @@ suite('dashboard', function() {
     var gcsConsolePath = __dirname + '/../bin/gcs-console';
     var gcsConsoleOptions = []; // TODO set port of gcs and gcs-console
 
-    if (!fs.existsSync(gcsPath)) {
+    if (!existsSync(gcsPath)) {
       var error = new Error('gcs executable is not found at ' + gcsPath + '. You need to setup gcs to test with gcs-console. Run "npm install gcs" (for the latest release) or "npm install git://github.com/groonga/gcs.git" (for the development)');
       return done(error);
     }
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る