Refactoring

This commit is contained in:
syuilo 2019-01-25 15:56:49 +09:00
parent 3330c3f548
commit 92b45d1a9d
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -45,12 +45,13 @@ describe('Streaming', () => {
server.close();
});
it('投稿がタイムラインに流れる', done => {
it('投稿がタイムラインに流れる', () => new Promise(async done => {
const post = {
text: 'foo'
};
signup().then(me => {
const me = await signup();
const ws = new WebSocket(`ws://localhost/streaming?i=${me.token}`);
ws.on('open', () => {
@ -76,6 +77,5 @@ describe('Streaming', () => {
}
}));
});
});
});
}));
});