{"action":"created","issue":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/1396","repository_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/1396/labels{/name}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/1396/comments","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/1396/events","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/1396","id":369621854,"node_id":"MDU6SXNzdWUzNjk2MjE4NTQ=","number":1396,"title":"Config isn't loaded with mocha","user":{"login":"GCorbel","id":1296201,"node_id":"MDQ6VXNlcjEyOTYyMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1296201?v=4","gravatar_id":"","url":"https://api.github.com/users/GCorbel","html_url":"https://github.com/GCorbel","followers_url":"https://api.github.com/users/GCorbel/followers","following_url":"https://api.github.com/users/GCorbel/following{/other_user}","gists_url":"https://api.github.com/users/GCorbel/gists{/gist_id}","starred_url":"https://api.github.com/users/GCorbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GCorbel/subscriptions","organizations_url":"https://api.github.com/users/GCorbel/orgs","repos_url":"https://api.github.com/users/GCorbel/repos","events_url":"https://api.github.com/users/GCorbel/events{/privacy}","received_events_url":"https://api.github.com/users/GCorbel/received_events","type":"User","site_admin":false},"labels":[{"id":917924624,"node_id":"MDU6TGFiZWw5MTc5MjQ2MjQ=","url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/labels/Question","name":"Question","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-12T16:25:43Z","updated_at":"2018-10-13T17:16:35Z","closed_at":null,"author_association":"NONE","body":"I have this simple test : \r\n\r\n```\r\nimport { describe, it, beforeEach, afterEach } from 'mocha';\r\nimport startApp from 'form/tests/helpers/start-app';\r\nimport destroyApp from 'form/tests/helpers/destroy-app';\r\nimport { setupApplicationTest } from 'ember-mocha';\r\nimport setupMirage from 'ember-cli-mirage/test-support/setup-mirage';\r\n\r\ndescribe('Acceptance | subscription', function() {\r\n  setupApplicationTest();\r\n  setupMirage();\r\n  let application;\r\n\r\n  beforeEach(function() {\r\n    application = startApp();\r\n  });\r\n\r\n  afterEach(function() {\r\n    destroyApp(application);\r\n  });\r\n\r\n  it('can fill a form', async function() {\r\n    await visit('/subscription');\r\n  });\r\n});\r\n```\r\n\r\nAnd I have this config file : \r\n\r\n```\r\nexport default function() {\r\n  this.get('/forms');\r\n}\r\n```\r\n\r\nWhen I run the test I have `Your Ember app tried to GET '/forms' ...`.\r\n\r\nThe solution I found is to add `import mirageConfig from 'form/mirage/config';` and do `this.server.loadConfig(mirageConfig); ` in the beforeEach hook.\r\n\r\nDoes this should be done with `setupMirage()` ?"},"comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments/429559168","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/1396#issuecomment-429559168","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/1396","id":429559168,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU1OTE2OA==","user":{"login":"samselikoff","id":2922250,"node_id":"MDQ6VXNlcjI5MjIyNTA=","avatar_url":"https://avatars1.githubusercontent.com/u/2922250?v=4","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T17:16:35Z","updated_at":"2018-10-13T17:16:35Z","author_association":"OWNER","body":"Seems weird. Any chance you could post a minimal reproduction?\n\nSent from my iPhone\n\n> On Oct 13, 2018, at 1:11 PM, Guirec Corbel <notifications@github.com> wrote:\n> \n> My mirage config is under mirage/config.js, the default path.\n> \n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n"}}
{"actor":{"display_login":"samselikoff"}}