you should not load attachment.js here, you should mock it instead. After all, you only need a name and a blob.