Bug 1497929 - Await the underlying promise r=chutten

Previously, the test never waited for the notification to actually fire.

Differential Revision: https://phabricator.services.mozilla.com/D8249

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan-Erik Rediger 2018-10-10 16:38:08 +00:00
Родитель be80a48cec
Коммит e73edabc8e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -49,7 +49,7 @@ add_task(async function testSendPendingOnIdleDaily() {
// Check that we are correctly receiving the gather-telemetry notification. // Check that we are correctly receiving the gather-telemetry notification.
TelemetrySession.observe(null, "idle-daily", null); TelemetrySession.observe(null, "idle-daily", null);
await gatherPromise; await gatherPromise.promise;
Assert.ok(true, "Received gather-telemetry notification."); Assert.ok(true, "Received gather-telemetry notification.");
Services.obs.removeObserver(gatherPromise.resolve, "gather-telemetry"); Services.obs.removeObserver(gatherPromise.resolve, "gather-telemetry");