8000 03_reverseString - update punctuation test case to include comma by vishpant76 · Pull Request #467 · TheOdinProject/javascript-exercises · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
16 changes: 9 additions & 7 deletions 03_reverseString/reverseString.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
const reverseString = require('./reverseString')
const reverseString = require('./reverseString');

describe('reverseString', () => {
test('reverses single word', () => {
expect(reverseString('hello')).toEqual('olleh');
});

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('');
});
});
4 changes: 3 additions & 1 deletion 03_reverseString/solution/reverseString-solution.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ describe('reverseString', () => {
});

test('works with numbers and punctuation', () => {
expect(reverseString('123! abc!')).toEqual('!cba !321');
expect(reverseString('123! abc! Hello, Odinite.')).toEqual(
'.etinidO ,olleH !cba !321'
);
});
test('works with blank strings', () => {
expect(reverseString('')).toEqual('');
Expand Down
0