Add test case for requirejs require functionality

Issue #310