add unit tests for requireLocal