Skip to content

Commit c0be150

Browse files
committed
fix test passing by default
1 parent 92a7c22 commit c0be150

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exercises/practice/error-handling/.meta/proof.ci.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const processString = (input) => {
44
throw new TypeError('Input must be a string');
55
}
66
if (input === '') {
7-
throw new Error('Input cannot be empty');
7+
throw new TypeError('Input cannot be empty');
88
}
99
return input.toUpperCase();
1010
} catch (error) {

exercises/practice/error-handling/error-handling.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('Error Handling', () => {
77
});
88

99
xtest('throws Error message if string is empty', () => {
10-
expect(() => processString('')).toThrow(Error);
10+
expect(() => processString('')).toThrow(TypeError);
1111
});
1212

1313
xtest('returns uppercase string if input is valid', () => {

0 commit comments

Comments
 (0)