Choosing a language with static typing means you will have less things to worry about at run time, because type errors will be caught at compile time.
But this doesn’t mean that your functions will magically become correct. There are many languages with strict, static typing, and they can all produce buggy programs.
So, no, unit-testing is not the biggest duplication of effort. It’s a way to raise your confidence that your functions will work they way they are intended to. Without that, your program is a big black box, which may hide its errors for months to the outside world.