Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
add manual pretender shutdown to fix acceptance tests (#477)
Browse files Browse the repository at this point in the history
no issue
- a [recent update](pretenderjs/pretender#178) to Pretender contained a breaking change that throws an error when multiple pretender instances exist
- using mirage in acceptance tests was [triggering the error](miragejs/ember-cli-mirage#915)
  • Loading branch information
kevinansfield authored and acburdine committed Jan 5, 2017
1 parent 111dc24 commit d2ae664
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/helpers/destroy-app.js
Expand Up @@ -2,6 +2,11 @@ import run from 'ember-runloop';
import $ from 'jquery';

export default function destroyApp(application) {
// this is required to fix "second Pretender instance" warnings
if (server) {
server.shutdown();
}

// this is required because it gets injected during acceptance tests but
// not removed meaning that the integration tests grab this element rather
// than their rendered content
Expand Down

0 comments on commit d2ae664

Please sign in to comment.