浏览代码

Add await keyword

sbkwgh 8 年之前
父节点
当前提交
1270af7161
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test/like.js

+ 2 - 2
test/like.js

@@ -153,7 +153,7 @@ describe('Like', () => {
 	it('should remove a like', async () => {
 		await admin.delete('/api/v1/post/3/like')
 
-		let postRes = admin.get('/api/v1/post/3')
+		let postRes = await admin.get('/api/v1/post/3')
 
 		postRes.should.have.status(200)
 		postRes.should.be.json
@@ -164,7 +164,7 @@ describe('Like', () => {
 	it('should do nothing if removing a like on something never liked', async () => {
 		await admin.delete('/api/v1/post/2/like')
 
-		let postRes = admin.get('/api/v1/post/2')
+		let postRes = await admin.get('/api/v1/post/2')
 
 		postRes.should.have.status(200)
 		postRes.should.be.json