8000 Merge pull request #74 from imrogerjiang/new-tests · codekacode/javascript-exercises@888383a · GitHub
[go: up one dir, main page]

Skip to content

Commit 888383a

Browse files
authored
Merge pull request TheOdinProject#74 from imrogerjiang/new-tests
2 parents c0d736a + 5817ea2 commit 888383a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

removeFromArray/removeFromArray.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ describe('removeFromArray', function() {
1919
xit('works with strings', function() {
2020
expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]);
2121
});
22+
xit('only removes same type', function() {
23+
expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]);
24+
});
2225
});

repeatString/repeatString.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ describe('repeatString', function() {
2727
was randomaly generated. */
2828
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number);
2929
});
30+
xit('works with blank strings', function() {
31+
expect(repeatString('', 10)).toEqual('');
32+
});
3033
});

reverseString/reverseString.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ describe('reverseString', function() {
1212
xit('works with numbers and punctuation', function() {
1313
expect(reverseString('123! abc!')).toEqual('!cba !321')
1414
})
15+
xit('works with blank strings', function() {
16+
expect(reverseString('')).toEqual('')
17+
})
1518
});

0 commit comments

Comments
 (0)
0