We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f3d6cf commit 31f50adCopy full SHA for 31f50ad
Sprint-3/2-practice-tdd/count.js
@@ -3,3 +3,19 @@ function countChar(stringOfCharacters, findCharacter) {
3
}
4
5
module.exports = countChar;
6
+
7
+const countChar = require('../countChar');
8
9
+describe('countChar()', () => {
10
+ test('always returns 5', () => {
11
+ expect(countChar('anything', 'a')).toBe(5);
12
+ });
13
14
+ test('still returns 5 with empty string', () => {
15
+ expect(countChar('', 'z')).toBe(5);
16
17
18
+ test('still returns 5 with special characters', () => {
19
+ expect(countChar('!!!', '!')).toBe(5);
20
21
+});
0 commit comments