GetEmitOutput function and testfiles

It is the legacy part from services.ts to make the result similar between test cases and inside language services