Move to central MIME functions, remove some console.log

And generally address PR feedback.
This commit is contained in:
Scott Nonnenberg 2018-04-12 19:02:20 -07:00
parent f255cbcbe3
commit fce9bb7342
No known key found for this signature in database
GPG key ID: 5F82280C35134661
6 changed files with 21 additions and 17 deletions

View file

@ -359,9 +359,9 @@ describe('Message', () => {
});
it('calls provided async function for each quoted attachment', async () => {
const upgradeAttachment = sinon.stub().returns(Promise.resolve({
const upgradeAttachment = sinon.stub().resolves({
path: '/new/path/on/disk',
}));
});
const upgradeVersion = Message._mapQuotedAttachments(upgradeAttachment);
const message = {

View file

@ -24,9 +24,6 @@ window.libphonenumber = {
};
window.Signal = {};
window.Signal.HTML = {
render: thing => thing,
};
window.Signal.Backup = {};
window.Signal.Crypto = {};
window.Signal.Logs = {};
@ -54,6 +51,9 @@ window.EmojiConvertor.prototype.img_sets = {
window.i18n = () => '';
// Ideally we don't need to add things here. We want to add them in StyleGuideUtil, which
// means that references to these things can't be early-bound, not capturing the direct
// reference to the function on file load.
window.Signal.Migrations.V17 = {};
window.Signal.OS = {};
window.Signal.Types = {};