aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/app/controllers/notice-controller-test.js5
-rw-r--r--test/unit/ui/app/actions.spec.js11
2 files changed, 6 insertions, 10 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()
})
})
diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js
index d395c9adb..a3b979d75 100644
--- a/test/unit/ui/app/actions.spec.js
+++ b/test/unit/ui/app/actions.spec.js
@@ -1321,14 +1321,11 @@ describe('Actions', () => {
completeOnboardingSpy.restore()
})
- it('', (done) => {
+ it('completing onboarding marks all notices as read', async () => {
const store = mockStore()
- store.dispatch(actions.setCompletedOnboarding())
- .then(() => {
- assert.equal(markAllNoticesReadSpy.callCount, 1)
- assert.equal(completeOnboardingSpy.callCount, 1)
- })
- done()
+ await store.dispatch(actions.setCompletedOnboarding())
+ assert.equal(markAllNoticesReadSpy.callCount, 1)
+ assert.equal(completeOnboardingSpy.callCount, 1)
})
})