Clear database before message view tests
This commit is contained in:
parent
9065b647ad
commit
9c7afab21b
1 changed files with 5 additions and 3 deletions
|
@ -1,17 +1,19 @@
|
||||||
describe('MessageView', function() {
|
describe('MessageView', function() {
|
||||||
var convo, message;
|
var convo, message;
|
||||||
|
|
||||||
before(function() {
|
before(async (done) => {
|
||||||
|
await clearDatabase();
|
||||||
convo = new Whisper.Conversation({id: 'foo'});
|
convo = new Whisper.Conversation({id: 'foo'});
|
||||||
message = convo.messageCollection.add({
|
message = convo.messageCollection.add({
|
||||||
conversationId: convo.id,
|
conversationId: convo.id,
|
||||||
body: 'hello world',
|
body: 'hello world',
|
||||||
type: 'outgoing',
|
type: 'outgoing',
|
||||||
source: '+14158675309',
|
source: '+14158675309',
|
||||||
received_at: Date.now()
|
received_at: Date.now(),
|
||||||
});
|
});
|
||||||
|
|
||||||
return storage.put('number_id', '+18088888888.1');
|
await storage.put('number_id', '+18088888888.1');
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display the message text', function() {
|
it('should display the message text', function() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue