Adding null checks to test helper and moving to addon test support directory to help namespacing
RENAME
test-support/helpers.js
addon-test-support/helpers.js
@@ -13,6 +13,11 @@ import Ember from 'ember';
*/
export default function isQueueDrained(app, queueName) {
const schedulerService = app.__container__.lookup('service:scheduler');
- const queue = schedulerService.queues[queueName];
+ const queues = schedulerService.queues;
+ if (!queues) {
+ return true;
+ }
+
+ const queue = queues[queueName];
return queue.tasks.length === 0;
}

Adding null checks to test helper and moving to addon test support directory to help namespacing