2021-04-30 21:49:46 +12:00
|
|
|
const reverseString = require('./reverseString')
|
2017-08-17 16:19:17 -05:00
|
|
|
|
2021-05-12 21:47:42 -04:00
|
|
|
describe('reverseString', function() {
|
|
|
|
|
it('reverses single word', function() {
|
2017-08-17 16:19:17 -05:00
|
|
|
expect(reverseString('hello')).toEqual('olleh');
|
|
|
|
|
});
|
|
|
|
|
|
2021-05-12 21:47:42 -04:00
|
|
|
xit('reverses multiple words', function() {
|
2017-08-17 16:19:17 -05:00
|
|
|
expect(reverseString('hello there')).toEqual('ereht olleh')
|
|
|
|
|
})
|
|
|
|
|
|
2021-05-12 21:47:42 -04:00
|
|
|
xit('works with numbers and punctuation', function() {
|
2017-08-17 16:19:17 -05:00
|
|
|
expect(reverseString('123! abc!')).toEqual('!cba !321')
|
|
|
|
|
})
|
2021-05-12 21:47:42 -04:00
|
|
|
xit('works with blank strings', function() {
|
2020-05-08 16:56:55 +10:00
|
|
|
expect(reverseString('')).toEqual('')
|
|
|
|
|
})
|
2018-08-07 11:23:28 +01:00
|
|
|
});
|