Skip to content

Commit 83feda2

Browse files
authored
Two Bucket: fix errant tests (#905)
* Fix tests expected to throw
1 parent f1a2cd1 commit 83feda2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/two-bucket/two-bucket.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('TwoBucket', () => {
7575
test.skip('Not possible to reach the goal', () => {
7676
const goal = 5;
7777
const twoBucket = new TwoBucket(buckOne, buckTwo, goal, starterBuck);
78-
expect(twoBucket.moves()).toThrow();
78+
expect(() => twoBucket.moves()).toThrow();
7979
});
8080

8181
xtest('With the same buckets but a different goal, then it is possible', () => {
@@ -90,7 +90,7 @@ describe('TwoBucket', () => {
9090
describe('Goal larger than both buckets', () => {
9191
test.skip('Is impossible', () => {
9292
const twoBucket = new TwoBucket(5, 7, 8, 'one');
93-
expect(twoBucket.moves()).toThrow();
93+
expect(() => twoBucket.moves()).toThrow();
9494
});
9595
});
9696
});

0 commit comments

Comments
 (0)