Revert edits

This commit is contained in:
Benjo Kho 2021-08-07 14:54:14 +08:00
parent 61f38bf60c
commit 3236ae156c
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
const reverseString = function(str) { const reverseString = function(str) {
let newStr = str.split("").reverse().join("");
}; };
module.exports = reverseString; module.exports = reverseString;

View File

@ -5,14 +5,14 @@ describe('reverseString', () => {
expect(reverseString('hello')).toEqual('olleh'); expect(reverseString('hello')).toEqual('olleh');
}); });
test('reverses multiple words', () => { test.skip('reverses multiple words', () => {
expect(reverseString('hello there')).toEqual('ereht olleh') expect(reverseString('hello there')).toEqual('ereht olleh')
}) })
test('works with numbers and punctuation', () => { test.skip('works with numbers and punctuation', () => {
expect(reverseString('123! abc!')).toEqual('!cba !321') expect(reverseString('123! abc!')).toEqual('!cba !321')
}) })
test('works with blank strings', () => { test.skip('works with blank strings', () => {
expect(reverseString('')).toEqual('') expect(reverseString('')).toEqual('')
}) })
}); });