Add unit tests for typed arrays