mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Merge branch 'solutions' into master
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const reverseString = function() {
|
||||
|
||||
var reverseString = function(string) {
|
||||
return string.split('').reverse().join('')
|
||||
}
|
||||
|
||||
module.exports = reverseString
|
||||
|
||||
@@ -5,14 +5,11 @@ describe('reverseString', function() {
|
||||
expect(reverseString('hello')).toEqual('olleh');
|
||||
});
|
||||
|
||||
xit('reverses multiple words', function() {
|
||||
it('reverses multiple words', function() {
|
||||
expect(reverseString('hello there')).toEqual('ereht olleh')
|
||||
})
|
||||
|
||||
xit('works with numbers and punctuation', function() {
|
||||
it('works with numbers and punctuation', function() {
|
||||
expect(reverseString('123! abc!')).toEqual('!cba !321')
|
||||
})
|
||||
xit('works with blank strings', function() {
|
||||
expect(reverseString('')).toEqual('')
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user