diff --git a/build/tasks/test.js b/build/tasks/test.js index 277e0424e6..77dfdfc6d5 100644 --- a/build/tasks/test.js +++ b/build/tasks/test.js @@ -20,7 +20,13 @@ var testConstants = require('../../test/unit/constants.js'); // by default for running the tests print debug to a file var debugPath = path.join(testConstants.tempdir, 'test-log/debug.log'); -process.env.HFC_LOGGING = util.format('{"debug":"%s"}', debugPath); +process.env.HFC_LOGGING = util.format('{"debug":"%s"}', escapeWindowsPath(debugPath)); + +function escapeWindowsPath(p) { + if (path.sep == "/") return p + return p.replace(/\\/g, "\\\\") +} + console.log('\n####################################################'); console.log(util.format('# debug log: %s', debugPath)); console.log('####################################################\n'); diff --git a/test/unit/fabric-ca-client.js b/test/unit/fabric-ca-client.js index e40a4ededf..62d085e8d6 100644 --- a/test/unit/fabric-ca-client.js +++ b/test/unit/fabric-ca-client.js @@ -269,8 +269,8 @@ test('FabricCAServices: Test newCryptoKeyStore() function', function(t) { } t.end(); }); -// Test optional consturctor -test('FabricCAServices: Test optional consturctor', function(t) { +// Test optional constructor +test('FabricCAServices: Test optional constructor', function(t) { let opts = { url : 'http://localhost:7054' } @@ -280,7 +280,7 @@ test('FabricCAServices: Test optional consturctor', function(t) { let service = new FabricCAServices(opts); }, null, - 'FabricCAServices consturctor with object and just url' + 'FabricCAServices constructor with object and just url' ); opts.caName = 'someca'; @@ -290,7 +290,7 @@ test('FabricCAServices: Test optional consturctor', function(t) { t.equals(service._fabricCAClient._caName,'someca','Caname should have been passed correctly'); }, null, - 'FabricCAServices consturctor with object and just url' + 'FabricCAServices constructor with object and just url' ); opts.cryptoSuite = 'somesuite'; @@ -300,7 +300,7 @@ test('FabricCAServices: Test optional consturctor', function(t) { t.equals(service._fabricCAClient._cryptoPrimitives,'somesuite','CryptoSuite should have been passed correctly'); }, null, - 'FabricCAServices consturctor with object and just url' + 'FabricCAServices constructor with object and just url' ); opts.tlsOptions = {verify : 'someverify'}; @@ -310,7 +310,7 @@ test('FabricCAServices: Test optional consturctor', function(t) { t.equals(service._fabricCAClient._tlsOptions.verify,'someverify','tlsOptions should have been passed correctly'); }, null, - 'FabricCAServices consturctor with object and just url' + 'FabricCAServices constructor with object and just url' ); t.end();