2017-08-17 21:19:17 +00:00
|
|
|
var reverseString = require('./reverseString')
|
|
|
|
|
|
|
|
describe('Hello World', function() {
|
|
|
|
it('reverses single word', function() {
|
|
|
|
expect(reverseString('hello')).toEqual('olleh');
|
|
|
|
});
|
|
|
|
|
2017-11-20 19:51:01 +00:00
|
|
|
it('reverses multiple words', function() {
|
2017-08-17 21:19:17 +00:00
|
|
|
expect(reverseString('hello there')).toEqual('ereht olleh')
|
|
|
|
})
|
|
|
|
|
2017-11-20 19:51:01 +00:00
|
|
|
it('works with numbers and punctuation', function() {
|
2017-08-17 21:19:17 +00:00
|
|
|
expect(reverseString('123! abc!')).toEqual('!cba !321')
|
|
|
|
})
|
2017-11-20 19:51:01 +00:00
|
|
|
});
|