QUnit.test('Setting a test adapter manually', function() { expect(1); var CustomAdapter; CustomAdapter = Adapter.extend({ asyncStart() { ok(true, 'Correct adapter was used'); } }); run(function() { App = EmberApplication.create(); Test.adapter = CustomAdapter.create(); App.setupForTesting(); }); Test.adapter.asyncStart(); });
import Adapter from "ember-testing/adapters/adapter"; /** This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework. @class QUnitAdapter @namespace Ember.Test @extends Ember.Test.Adapter */ var QUnitAdapter = Adapter.extend({ asyncStart: function() { stop(); }, asyncEnd: function() { start(); }, exception: function(error) { ok(false, inspect(error)); } }); export default QUnitAdapter;