03_reverseString - update punctuation test case to include comma (#467)

This commit is contained in:
vishpant76
2024-05-07 00:10:50 +05:30
committed by GitHub
parent 097a73634f
commit d67e7a3ecb
2 changed files with 12 additions and 8 deletions
+9 -7
View File
@@ -1,4 +1,4 @@
const reverseString = require('./reverseString')
const reverseString = require('./reverseString');
describe('reverseString', () => {
test('reverses single word', () => {
@@ -6,13 +6,15 @@ describe('reverseString', () => {
});
test.skip('reverses multiple words', () => {
expect(reverseString('hello there')).toEqual('ereht olleh')
})
expect(reverseString('hello there')).toEqual('ereht olleh');
});
test.skip('works with numbers and punctuation', () => {
expect(reverseString('123! abc!')).toEqual('!cba !321')
})
expect(reverseString('123! abc! Hello, Odinite.')).toEqual(
'.etinidO ,olleH !cba !321'
);
});
test.skip('works with blank strings', () => {
expect(reverseString('')).toEqual('')
})
expect(reverseString('')).toEqual('');
});
});