really nice KATA!
( JS )
Error message for failing Magic.proto.register instanceof Function assumes it does not exist. There are other reasons this test could fail.
Magic.proto.register instanceof Function
Same for instance.name.
Testing for prototype methods depends on them being enumerable. It also does not actually test register is the only one.
( JS, possibly others )
Example tests would be nice.
There's something of random tests. The first argument is random, though the second is hardcoded.
Outputs are unpredictable, so it is enough to prevent completely hardcoding a solution. It won't find many edge cases of course.
It's an old kata ..
Looks your function can't cut it - Expected: 1.3069892237633987e+308, instead got: 8.077637632156222e+307
not sure why this is a thing - 8.077637632156222e+307 < 1.3069892237633987e+308
needs random tests (JS at least)
Needs random tests.
Fixed for Java.
Help us help you. Tell us which language you're having this problem with.
No random tests.
Do you actually need the register method for this task anyway? It can be easily done inside the MagicModel constructor.
Test coverage is abysmal.
How did this Kata make it out of beta?
You've got integer overflow in the tests. The results don't have precision at all because you have a cumulative error that climbs up as n increases. You should have used big integers.