Simple wrapper for pretender.js, this project removes the need for the developer to know which files need to be imported.
ember install ember-cli-pretender
You can then import Pretender in your tests:
see: pretenderjs/pretender for pretender docs
pretender.enabled will be set to
app.tests. This means that pretender will only be available as an import when your app includes your test suite.
If you'd like to include Pretender into production builds as well, you can set
true in your
var app = pretender: enabled: true ;
You can also opt out of including the fetch polyfill, if you do not need to run your tests in older browsers:
var app = pretender: includeFetchPolyfill: false ;
Nested Addon Usage Caveat
To publish an addon that exports functionality driven by ember-cli-pretender,
note that ember-cli-pretender must be listed in the
dependencies for NPM
and not the