forked from mushmelow/basic-javascript-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrapCharacter.js
More file actions
16 lines (12 loc) · 764 Bytes
/
Copy pathwrapCharacter.js
File metadata and controls
16 lines (12 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var expect = require('chai').expect;
var wrapCharacter = require('../workshop').wrapCharacter;
var largeString = 'the increased productivity fostered by a friendly environment and quality tools is essential to meet ever increasing demands for software.'
var largeStringCharWrapped = 'the increased productivity fostered by a\nfriendly environment and quality tools i\ns essential to meet ever increasing dema\nnds for software.'
describe('wrapCharacter', function() {
it('Should wrap a string correctly', function() {
expect(wrapCharacter(largeString)).to.equal(largeStringCharWrapped);
});
it('Should work with strings less than 40 characters', function() {
expect(wrapCharacter('hello world')).to.equal('hello world');
});
});