From f62b63d2903da394d05d6a9daaf5d6774bb058ec Mon Sep 17 00:00:00 2001 From: Spiral Out Date: Sun, 8 Oct 2017 13:55:40 +0300 Subject: [PATCH] It tests combine two strings JS solution. --- tests/javascript/combine-two-strings.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/javascript/combine-two-strings.js diff --git a/tests/javascript/combine-two-strings.js b/tests/javascript/combine-two-strings.js new file mode 100644 index 0000000..7a10b0b --- /dev/null +++ b/tests/javascript/combine-two-strings.js @@ -0,0 +1,20 @@ +var expect = require('chai').expect; +var combineTwoStrings = require('../../solutions/javascript/combine-two-strings'); + +describe('it tests combine two strings function', function(){ + var str1 = 'abc'; + var str2 = 'def'; + var str3valid = 'dabecf'; + var str3invalid = 'dabfce'; + + it("it tests that f('" + str1 + "," +str2 + ",'" +str3valid + "')' is valid " , function(){ + var result = combineTwoStrings(str1, str2, str3valid); + expect(result).to.be.true; + }); + + it("it tests that f('" + str1 + "," +str2 + ",'" +str3invalid + "')' is invalid " , function(){ + var result = combineTwoStrings(str1, str2, str3invalid); + expect(result).to.be.false; + }); + +});