Episode 12 should not do both tests with the same number
markm-dragoni opened this issue · 1 comments
markm-dragoni commented
const coerceAmount = (amount: number | { amount: number }) => {
return 20;
};
it("Should return the amount when passed an object", () => {
expect(coerceAmount({ amount: 20 })).toEqual(20);
});
it("Should return the amount when passed a number", () => {
expect(coerceAmount(20)).toEqual(20);
});
Ex 12 can be passed with just returning 20, perhaps the tests should use two different numbers to make this work around less obvious?
mattpocock commented
This seems fine to me!