Move to npm for several dependencies

mustache
jQuery
underscore
backbone
mocha
chai
intl-tel-input
This commit is contained in:
Scott Nonnenberg 2018-05-19 20:53:12 -07:00
parent a593a148e8
commit cfe0bd0e79
32 changed files with 146 additions and 35694 deletions

View file

@ -68,19 +68,16 @@ before(function(done) {
};
});
async function clearDatabase(done) {
async function clearDatabase() {
await Signal.Migrations.Migrations0DatabaseWithAttachmentData.run({
Backbone,
databaseName: Whisper.Database.id,
});
const convos = new Whisper.ConversationCollection();
await convos.fetch();
await convos.destroyAll();
await wrapDeferred(convos.fetch());
await wrapDeferred(convos.destroyAll());
const messages = new Whisper.MessageCollection();
await messages.fetch();
await messages.destroyAll();
if (done) {
done();
}
await wrapDeferred(messages.fetch());
await wrapDeferred(messages.destroyAll());
}