Add `serial_test` unit test
also refactored `module_type`