Skip to content

Commit eab8af2

Browse files
SpiralOutDotEublakeembrey
authored andcommitted
Test combine two strings in JS (blakeembrey#186)
1 parent ce8eb51 commit eab8af2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var expect = require('chai').expect;
2+
var combineTwoStrings = require('../../solutions/javascript/combine-two-strings');
3+
4+
describe('it tests combine two strings function', function(){
5+
var str1 = 'abc';
6+
var str2 = 'def';
7+
var str3valid = 'dabecf';
8+
var str3invalid = 'dabfce';
9+
10+
it("it tests that f('" + str1 + "," +str2 + ",'" +str3valid + "')' is valid " , function(){
11+
var result = combineTwoStrings(str1, str2, str3valid);
12+
expect(result).to.be.true;
13+
});
14+
15+
it("it tests that f('" + str1 + "," +str2 + ",'" +str3invalid + "')' is invalid " , function(){
16+
var result = combineTwoStrings(str1, str2, str3invalid);
17+
expect(result).to.be.false;
18+
});
19+
20+
});

0 commit comments

Comments
 (0)