diff options
notices - markAllNoticesRead - use async/await
Diffstat (limited to 'test/unit/app/controllers/notice-controller-test.js')
-rw-r--r-- | test/unit/app/controllers/notice-controller-test.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/app/controllers/notice-controller-test.js b/test/unit/app/controllers/notice-controller-test.js index 95e3ea9bd..d550d86cd 100644 --- a/test/unit/app/controllers/notice-controller-test.js +++ b/test/unit/app/controllers/notice-controller-test.js @@ -40,7 +40,7 @@ describe('notice-controller', function () { }) describe('#markAllNoticesRead', () => { - it('marks all notices read', (done) => { + it('marks all notices read', async () => { const testList = [{ id: 0, read: false, @@ -57,11 +57,10 @@ describe('notice-controller', function () { noticeController.setNoticesList(testList) - noticeController.markAllNoticesRead() + await noticeController.markAllNoticesRead() const unreadNotices = noticeController.getUnreadNotices() assert.equal(unreadNotices.length, 0) - done() }) }) |