mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-19 14:43:22 +09:00
Merge pull request #74 from imrogerjiang/new-tests
This commit is contained in:
@@ -19,4 +19,7 @@ describe('removeFromArray', function() {
|
|||||||
xit('works with strings', function() {
|
xit('works with strings', function() {
|
||||||
expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]);
|
expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]);
|
||||||
});
|
});
|
||||||
|
xit('only removes same type', function() {
|
||||||
|
expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,4 +27,7 @@ describe('repeatString', function() {
|
|||||||
was randomaly generated. */
|
was randomaly generated. */
|
||||||
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number);
|
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number);
|
||||||
});
|
});
|
||||||
|
xit('works with blank strings', function() {
|
||||||
|
expect(repeatString('', 10)).toEqual('');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,4 +12,7 @@ describe('reverseString', function() {
|
|||||||
xit('works with numbers and punctuation', function() {
|
xit('works with numbers and punctuation', function() {
|
||||||
expect(reverseString('123! abc!')).toEqual('!cba !321')
|
expect(reverseString('123! abc!')).toEqual('!cba !321')
|
||||||
})
|
})
|
||||||
|
xit('works with blank strings', function() {
|
||||||
|
expect(reverseString('')).toEqual('')
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user