8000 03_reverseString - update punctuation test case to include comma (#467) · rwlarson1/javascript-exercises@d67e7a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit d67e7a3

Browse files
authored
03_reverseString - update punctuation test case to include comma (TheOdinProject#467)
1 parent 097a736 commit d67e7a3

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
const reverseString = require('./reverseString')
1+
const reverseString = require('./reverseString');
22

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

88
test.skip('reverses multiple words', () => {
9-
expect(reverseString('hello there')).toEqual('ereht olleh')
10-
})
9+
expect(reverseString('hello there')).toEqual('ereht olleh');
10+
});
1111

1212
test.skip('works with numbers and punctuation', () => {
13-
expect(reverseString('123! abc!')).toEqual('!cba !321')
14-
})
13+
expect(reverseString('123! abc! Hello, Odinite.')).toEqual(
14+
'.etinidO ,olleH !cba !321'
15+
);
16+
});
1517
test.skip('works with blank strings', () => {
16-
expect(reverseString('')).toEqual('')
17-
})
18+
expect(reverseString('')).toEqual('');
19+
});
1820
});

03_reverseString/solution/reverseString-solution.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ describe('reverseString', () => {
1010
});
1111

1212
test('works with numbers and punctuation', () => {
13-
expect(reverseString('123! abc!')).toEqual('!cba !321');
13+
expect(reverseString('123! abc! Hello, Odinite.')).toEqual(
14+
'.etinidO ,olleH !cba !321'
15+
);
1416
});
1517
test('works with blank strings', () => {
1618
expect(reverseString('')).toEqual('');

0 commit comments

Comments
 (0)
0