Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/javascript/combine-two-strings.js
Original file line number Diff line number Diff line change
@@ -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;
});

});