After upgrading my application, ember-cli-mirage doesn’t seem to use mirage/config as a part of the setup. As a result, routes are not defined as a part of the server._config & none of the existing Acceptance tests are working. I’ve placed a debugger in the mirage/config that isn’t hit when setupMirage(hooks) is run in the test setup. This issue seemed to be introduced after adding webpack & upgrading ember-auto-import.
This is my redacted mirage/config:
import { createServer } from "miragejs";
import { discoverEmberDataModels } from "ember-cli-mirage";
export default function(config) {
const finalConfig = {
...config,
models: { ...discoverEmberDataModels(),
...config.models },
routes() {...}
};
debugger; // This debugger is never hit
return createServer(finalConfig);
}
My application versions are as follows:
- ember-auto-import: 2.6.1 (I originally had this on version 2.7.3, which further broke the tests on load; couldn’t find the internally imported miragejs)
- ember-cli-mirage: 2.4.0
- ember-source: 4.0.0
- ember-qunit: 6.2.0
Does anyone have any insight on what to do to get the config included in setupMirage(hooks) and have my routes included?