I don't think that appending the element you created into Karma's DOM will cause any problems. You can do it like this:
$("body").append($compile(html)(scope));
scope.$digest();
If you don't want to mess with Karma's DOM perhaps try the html2js preprocessor suggested in this question: Load HTML files with Karma