diff --git a/packages/ember/README.md b/packages/ember/README.md index ada9f59..1a75a29 100644 --- a/packages/ember/README.md +++ b/packages/ember/README.md @@ -11,7 +11,7 @@ A build chain for WebWorkers in Ember applications with intuitive ergonomics. ## Usage To use a worker in your application or addon, you first have to define -a new worker in a top-level `workers/` directory in your project. +a new worker in a top-level `workers/` directory in the root your project (as opposed to `app/`). > **Example 1** > diff --git a/packages/ember/addon-test-support/index.js b/packages/ember/addon-test-support/index.js new file mode 100644 index 0000000..8a205f8 --- /dev/null +++ b/packages/ember/addon-test-support/index.js @@ -0,0 +1,7 @@ +import { getContext } from '@ember/test-helpers'; + +export function getWorker(name) { + let { owner } = getContext(); + + return owner.lookup('service:-workers').getWorker(name); +}