From: himetani_cafe Date: Thu, 21 Jan 2016 07:48:12 +0000 (+0900) Subject: modified test comment X-Git-Tag: v0.3.0p0005~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4214bbe31038244821d7ba6d4b2c4a43f72744f7;p=eos%2Fzephyr.git modified test comment --- diff --git a/test/mocha/Eos.test.js b/test/mocha/Eos.test.js index a477abf..4b30493 100644 --- a/test/mocha/Eos.test.js +++ b/test/mocha/Eos.test.js @@ -23,68 +23,79 @@ describe(/*execute()*/test1, function() { it('should return false when the command is typeof number.', function() { var result = eos.execute(2); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when command name is invalid', function() { var result = eos.execute('hoge'); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when options is not Array', function() { var result = eos.execute('mrcImageInfo', {}); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when options is Array whose length is 0.', function() { var result = eos.execute('mrcImageInfo', []); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when options is invalid Object which have not "name" and "argumetns"', function() { var result = eos.execute('mrcImageInfo', [{hoge: 'hoge'}]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when "argumetns" properties are not Array', function() { var result = eos.execute('mrcImageInfo', [{name: 'hoge', arguments: 'hoge'}]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when "argumetns" properties are not Array', function() { var result = eos.execute('mrcImageInfo', [{name: 'hoge', arguments: 'hoge'}]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when required options do not exist', function() { var result = eos.execute('mrcImageInfo', [{name: 'hoge', arguments: []}]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when required options do not exist', function() { var result = eos.execute('dcdFilePrint', [{name: '-r', arguments: [1,2]}, { name: '-i', arguments: []}, { name: '-o', arguments: []} ]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when input file does not exist', function() { var result = eos.execute('dcdFilePrint', [{name: '-r', arguments: [1,2,3]}, { name: '-i', arguments: ['hoge.txt']}, { name: '-o', arguments: ['hoge.txt']} ]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when output file is not string', function() { var result = eos.execute('dcdFilePrint', [{name: '-r', arguments: [1,2,3]}, { name: '-i', arguments: ['file1.txt']}, { name: '-o', arguments: [3]} ]); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return false when output file has already existed', function() { var result = eos.execute('dcdFilePrint', [{name: '-r', arguments: [1,2,3]}, { name: '-i', arguments: ['file1.txt']}, { name: '-o', arguments: ['file1.txt']} ]); - console.log(result.comment); expect(result.hasDone).to.equal(false); + console.log(' '+result.comment); }); it('should return true when all options is proper.', function() { var result = eos.execute('dcdFilePrint', [{name: '-r', arguments: [1,2,3]}, { name: '-i', arguments: ['file1.txt']}, { name: '-o', arguments: ['file3.txt']} ]); - //console.log(result.comment); expect(result.hasDone).to.equal(true); + console.log(' '+result.comment); }); });