From f4ef63b5733ae20f57c925965df32413d50c9696 Mon Sep 17 00:00:00 2001 From: whyzdev Date: Mon, 19 Dec 2016 00:09:12 -0500 Subject: [PATCH] change " to ' per code climate --- test/cli_test-samples.js | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/test/cli_test-samples.js b/test/cli_test-samples.js index 4a233320bef..7ee749c5158 100644 --- a/test/cli_test-samples.js +++ b/test/cli_test-samples.js @@ -8,13 +8,13 @@ var fs = require('fs') , clone = require('clone') , rimraf = require('rimraf') -var test_dir = "test/fixtures/samples/".replace('/',path.sep) +var test_dir = 'test/fixtures/samples/'.replace('/',path.sep) rimraf.sync(test_dir+'*.actual.*'); function exec_mermaid(args, verify) { exec('bin/mermaid.js ' + args, - {env: {PATH: "./node_modules/.bin"+path.delimiter+process.env.PATH}}, + {env: {PATH: './node_modules/.bin'+path.delimiter+process.env.PATH}}, function(error, stdout, stderr) { console.log('error:',error,'\nstdout:\n',stdout,'\nstderr:\n',stderr); verify(error, stdout, stderr); @@ -23,8 +23,8 @@ function exec_mermaid(args, verify) { test('mermaid cli help', function(t) { t.plan(1); - var args = [ "--help", ] - exec_mermaid(args.join(" "), + var args = [ '--help', ] + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.notOk(error, 'no error') t.end() @@ -33,8 +33,8 @@ test('mermaid cli help', function(t) { test('mermaid cli help', function(t) { t.plan(1); - var args = [ "--badopt", ] - exec_mermaid(args.join(" "), + var args = [ '--badopt', ] + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.ok(stderr, 'should get error') t.end() @@ -44,12 +44,12 @@ test('mermaid cli help', function(t) { //todo test.skip('sequence syntax error', function(t) { t.plan(1); - var args = [ "--svg", - "--outputDir=" + test_dir, - "--outputSuffix=.actual", - test_dir+"sequence_err.mmd", + var args = [ '--svg', + '--outputDir=' + test_dir, + '--outputSuffix=.actual', + test_dir+'sequence_err.mmd', ] - exec_mermaid(args.join(" "), + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.ok(stderr, 'should get error') t.end() @@ -59,13 +59,13 @@ test.skip('sequence syntax error', function(t) { ['', 'fo', 'tspan', 'old'].forEach(function(textPlacement) { test('sequence svg text placelment: '+textPlacement, function(t) { t.plan(1); - var args = [ "--svg", - "--outputDir=" + test_dir, - "--outputSuffix="+(textPlacement ? "_"+textPlacement : "")+".actual", - textPlacement ? "--sequenceConfig="+test_dir+"sequence_text_"+textPlacement+".cfg" : "", - test_dir+"sequence_text.mmd", + var args = [ '--svg', + '--outputDir=' + test_dir, + '--outputSuffix='+(textPlacement ? '_'+textPlacement : '')+'.actual', + textPlacement ? '--sequenceConfig='+test_dir+'sequence_text_'+textPlacement+'.cfg' : '', + test_dir+'sequence_text.mmd', ] - exec_mermaid(args.join(" "), + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.notOk(stderr, 'no error') t.end() @@ -75,12 +75,12 @@ test.skip('sequence syntax error', function(t) { test('sequence png', function(t) { t.plan(1); - var args = [ "--png", - "--outputDir=" + test_dir, - "--outputSuffix=.actual", - test_dir+"sequence_text.mmd", + var args = [ '--png', + '--outputDir=' + test_dir, + '--outputSuffix=.actual', + test_dir+'sequence_text.mmd', ] - exec_mermaid(args.join(" "), + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.notOk(stderr, 'no error') t.end() @@ -89,12 +89,12 @@ test('sequence png', function(t) { test('flowchart svg text', function(t) { t.plan(1); - var args = [ "--svg", - "--outputDir=" + test_dir, - "--outputSuffix=.actual", - test_dir+"flowchart_text.mmd", + var args = [ '--svg', + '--outputDir=' + test_dir, + '--outputSuffix=.actual', + test_dir+'flowchart_text.mmd', ] - exec_mermaid(args.join(" "), + exec_mermaid(args.join(' '), function(error, stdout, stderr) { t.notOk(stderr, 'no error') t.end()